summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-12-15 21:15:46 +0000
committerErmal <eri@pfsense.org>2013-12-15 21:15:46 +0000
commit08b64f791426c4a9f980fd7b2f6d5359eff41c69 (patch)
tree9b232f0f56cfa2ef18cccb403b52a6162ae11d7c /etc
parent815f1f77ed88ce0eeb5b537fe6f7cc354eaa93de (diff)
downloadpfsense-08b64f791426c4a9f980fd7b2f6d5359eff41c69.zip
pfsense-08b64f791426c4a9f980fd7b2f6d5359eff41c69.tar.gz
Use events to start sshd rather than relying on forking
Diffstat (limited to 'etc')
-rw-r--r--etc/phpshellsessions/enablesshd4
-rwxr-xr-xetc/rc.bootup2
-rwxr-xr-xetc/rc.initial.toggle_sshd4
3 files changed, 5 insertions, 5 deletions
diff --git a/etc/phpshellsessions/enablesshd b/etc/phpshellsessions/enablesshd
index 6e601dd..0dc76de 100644
--- a/etc/phpshellsessions/enablesshd
+++ b/etc/phpshellsessions/enablesshd
@@ -8,5 +8,5 @@ $config['system']['enablesshd'] = true;
echo ".";
write_config("pfSsh.php enabled sshd");
echo "\nEnabling SSHD, please wait...";
-exec("/etc/sshd");
-echo "\n\n"; \ No newline at end of file
+send_event("service reload sshd");
+echo "\n\n";
diff --git a/etc/rc.bootup b/etc/rc.bootup
index f391a27..1b6ee0f 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -248,7 +248,7 @@ interfaces_loopback_configure();
system_syslogd_start();
echo "Starting Secure Shell Services...";
-mwexec_bg("/etc/sshd");
+send_event("service reload sshd");
echo "done.\n";
/* setup polling */
diff --git a/etc/rc.initial.toggle_sshd b/etc/rc.initial.toggle_sshd
index a7ecf6b..5f2de53 100755
--- a/etc/rc.initial.toggle_sshd
+++ b/etc/rc.initial.toggle_sshd
@@ -45,7 +45,7 @@ if (isset($config['system']['enablesshd'])) {
write_config();
echo " done.\n";
echo "\nDisabling SSHD...";
- exec("/etc/sshd");
+ send_event("service reload sshd");
echo " done.\n";
exec("ps awux | grep '/usr/sbin/sshd' | grep -v grep | awk '{print $2}' | xargs kill");
}
@@ -59,7 +59,7 @@ if (isset($config['system']['enablesshd'])) {
write_config();
echo " done.\n";
echo "\nEnabling SSHD...";
- exec("/etc/sshd");
+ send_event("service reload sshd");
echo " done.\n\n";
}
}
OpenPOWER on IntegriCloud