diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-reboot.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/vyatta-reboot.pl b/scripts/vyatta-reboot.pl index 3dc212c..bec4ebd 100755 --- a/scripts/vyatta-reboot.pl +++ b/scripts/vyatta-reboot.pl @@ -67,7 +67,9 @@ sub do_reboot { my $login = shift; syslog("warning", "Reboot now requested by $login"); - exec("sudo /sbin/reboot"); + if (!system("sudo /sbin/reboot")) { + exec("sudo /usr/bin/killall sshd"); + } } sub cancel_reboot { |