From df59cb0d1bbcfc4796609fd7f1e6268d7f6375b8 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 7 Apr 2015 19:38:16 +0000 Subject: [PATCH] cleanup configd commands (sshd) --- src/etc/inc/service-utils.inc | 4 ++-- src/opnsense/service/conf/actions.d/actions_sshd.conf | 6 ++++++ src/opnsense/service/conf/actions_service.conf | 6 ------ src/www/system_advanced_admin.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 src/opnsense/service/conf/actions.d/actions_sshd.conf diff --git a/src/etc/inc/service-utils.inc b/src/etc/inc/service-utils.inc index a2457084a..f338963fc 100644 --- a/src/etc/inc/service-utils.inc +++ b/src/etc/inc/service-utils.inc @@ -379,7 +379,7 @@ if (!function_exists('service_control_start')) { vpn_ipsec_force_reload(); break; case 'sshd': - configd_run("service restart sshd"); + configd_run("sshd restart"); break; case 'openvpn': $vpnmode = isset($extras['vpnmode']) ? htmlspecialchars($extras['vpnmode']) : htmlspecialchars($extras['mode']); @@ -523,7 +523,7 @@ if (!function_exists('service_control_restart')) { vpn_ipsec_force_reload(); break; case 'sshd': - configd_run("service restart sshd"); + configd_run("sshd restart"); break; case 'openvpn': $vpnmode = htmlspecialchars($extras['vpnmode']); diff --git a/src/opnsense/service/conf/actions.d/actions_sshd.conf b/src/opnsense/service/conf/actions.d/actions_sshd.conf new file mode 100644 index 000000000..40b9956ca --- /dev/null +++ b/src/opnsense/service/conf/actions.d/actions_sshd.conf @@ -0,0 +1,6 @@ +[restart] +command:/usr/local/etc/rc.sshd +parameters: +type:script +message:starting sshd + diff --git a/src/opnsense/service/conf/actions_service.conf b/src/opnsense/service/conf/actions_service.conf index a7befc415..892f9852e 100644 --- a/src/opnsense/service/conf/actions_service.conf +++ b/src/opnsense/service/conf/actions_service.conf @@ -34,9 +34,3 @@ parameters: type:script message:Starting nptd -[reload|restart.sshd] -command:/usr/local/etc/rc.sshd -parameters: -type:script -message:starting sshd - diff --git a/src/www/system_advanced_admin.php b/src/www/system_advanced_admin.php index 601271017..71b01de9f 100644 --- a/src/www/system_advanced_admin.php +++ b/src/www/system_advanced_admin.php @@ -608,7 +608,7 @@ if ($restart_sshd) { if ($config['system']['ssh']['enabled']) { log_error(gettext("secure shell configuration has changed. Restarting sshd.")); - configd_run("service restart sshd"); + configd_run("sshd restart"); } } if ($restart_webgui) {