unrealircd: don't have checkconfig accidentally start the server
This commit is contained in:
parent
56678e5ece
commit
26e4c0d022
|
@ -34,7 +34,7 @@ fi
|
||||||
checkconfig() {
|
checkconfig() {
|
||||||
# command_args weirdness because we want to preserve the chroot arguments if it's set
|
# command_args weirdness because we want to preserve the chroot arguments if it's set
|
||||||
# Only run the configtest for the main instance; it can't work right now for others (no way to specify config file)
|
# Only run the configtest for the main instance; it can't work right now for others (no way to specify config file)
|
||||||
[ ${SVCNAME} = unrealircd ] && su -s /bin/sh ${command_user:=root} -c "${command} ${command_args%${UNREALIRCD_COMMAND_ARGS}}" configtest
|
[ ${SVCNAME} = unrealircd ] && su -s /bin/sh ${command_user:=root} -c "${command} ${command_args%${UNREALIRCD_COMMAND_ARGS}} -c"
|
||||||
}
|
}
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
|
@ -42,7 +42,20 @@ depend() {
|
||||||
provide ircd
|
provide ircd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# It is unsafe for the unrealircd user to be able to write to its own
|
||||||
|
# PID file, since root will be sending e.g. kill signals to the PID
|
||||||
|
# listed in that file. Ensure that we overwrite the ownership and
|
||||||
|
# permissions on /run/unrealircd from previous init scripts.
|
||||||
|
start_pre() {
|
||||||
|
# commented out pending information about where to do pidfile vs. socket stuff
|
||||||
|
# checkpath --directory --owner root:root --mode 0700 "${UNREALIRCD_CHROOT}"/run/unrealircd
|
||||||
|
|
||||||
|
checkconfig || return $?
|
||||||
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
|
checkconfig || return $?
|
||||||
|
|
||||||
ebegin "Reloading ${RC_SVCNAME}"
|
ebegin "Reloading ${RC_SVCNAME}"
|
||||||
start-stop-daemon --signal HUP \
|
start-stop-daemon --signal HUP \
|
||||||
--pidfile "${pidfile}" \
|
--pidfile "${pidfile}" \
|
||||||
|
|
Loading…
Reference in New Issue