Home ยป Restart dhcpd, dns via cli and set a schedule task in pfSense

Restart dhcpd, dns via cli and set a schedule task in pfSense

0 comment 163 views

Execute below command in cli to restart dhcpd

pfSsh.php playback restartdhcpd

Execute below command in cli to restart dns

pfSsh.php playback svc restart unbound

For schedule task, edit crontab, such as use ssh to edit /etc/crontab

For example:
*/5 * * * * root pfSsh.php playback svc restart unbound

After that, restart cron service

killall cron ; cron

Refer
Restart DNS (unbound) via cli in pfSense
https://forum.netgate.com/topic/123547/restart-dns-unbound-resolver-from-command-line/2
Restart dhcpd via cli in pfSenes
https://forum.netgate.com/topic/104440/restart-dhcpd-via-console-ssh-commandline
Set schedule task in pfSense
https://forum.netgate.com/topic/2060/is-it-possible-to-schedule-a-command-with-pfsense
Crontab help page
https://man.freebsd.org/cgi/man.cgi?crontab%285%29

Leave a Comment