aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-22 18:12:22 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-22 18:12:22 +0100
commit305de55ddaf9cd50e77dab247f433bf657f1c98d (patch)
treea016f6520784ab4b38b3beb9a208cc7d29ad85fc
parent2a1876dd1c2e1e8df19a002f97d4cc2fc2216328 (diff)
downloadrspamd-305de55ddaf9cd50e77dab247f433bf657f1c98d.tar.gz
rspamd-305de55ddaf9cd50e77dab247f433bf657f1c98d.zip
Revert "Disable reload command in rc scripts"
This reverts commit 869af99b494d89e6d100657db4d5430cc6539f51.
-rw-r--r--centos/sources/rspamd.init9
-rw-r--r--debian/rspamd.init7
-rwxr-xr-xfreebsd/rspamd.sh.in2
3 files changed, 15 insertions, 3 deletions
diff --git a/centos/sources/rspamd.init b/centos/sources/rspamd.init
index 633ed36be..ee3365b31 100644
--- a/centos/sources/rspamd.init
+++ b/centos/sources/rspamd.init
@@ -111,6 +111,13 @@ case "$1" in
restart|configtest)
$1
;;
+ reload)
+ rh_status_q || exit 7
+ $1
+ ;;
+ force-reload)
+ force_reload
+ ;;
status)
rh_status
;;
@@ -119,6 +126,6 @@ case "$1" in
restart
;;
*)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|configtest}"
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac
diff --git a/debian/rspamd.init b/debian/rspamd.init
index 784f0ac96..1a270692e 100644
--- a/debian/rspamd.init
+++ b/debian/rspamd.init
@@ -104,6 +104,11 @@ case "$1" in
status)
status_of_proc -p $PIDFILE "$DAEMON" "$NAME" || exit $?
;;
+ reload|force-reload)
+ log_daemon_msg "Reloading $DESC" "$NAME"
+ do_reload
+ log_end_msg $?
+ ;;
reopenlog)
log_daemon_msg "Reopen logs for $DESC" "$NAME"
do_reopenlog
@@ -128,7 +133,7 @@ case "$1" in
esac
;;
*)
- echo "Usage: $SCRIPTNAME {start|stop|restart|reopenlog}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|reopenlog}" >&2
exit 3
;;
esac
diff --git a/freebsd/rspamd.sh.in b/freebsd/rspamd.sh.in
index c53f0f50b..c527a6d1d 100755
--- a/freebsd/rspamd.sh.in
+++ b/freebsd/rspamd.sh.in
@@ -43,7 +43,7 @@ reopenlog_cmd()
pkill -USR1 -F $rspamd_pidfile
}
-extra_commands="configtest reopenlog"
+extra_commands="reload configtest reopenlog"
sig_reload="HUP"
command="$procname"