Commit ec5681f0 authored by Johannes Truschnigg's avatar Johannes Truschnigg Committed by max ulidtko
Browse files

Do not install SysV init-scripts on systemd-enabled hosts

Also, hint at example service unit files if systemd is detected. Thanks
to @mika for spotting a bug in the original iteration of this patch.
parent 5bbc112f
...@@ -73,6 +73,16 @@ if [ "$(id -u)" -ne 0 ] ; then ...@@ -73,6 +73,16 @@ if [ "$(id -u)" -ne 0 ] ; then
exit 1 exit 1
fi fi
#bail if this system is managed by systemd
_pid_1_exe="$(readlink -f /proc/1/exe)"
if [ "${_pid_1_exe##*/}" = systemd ]
then
echo "This systems seems to use systemd."
echo "Please take a look at the provided example service unit files in this directory, and adapt and install them. Sorry!"
exit 1
fi
unset _pid_1_exe
if ! echo $REDIS_PORT | egrep -q '^[0-9]+$' ; then if ! echo $REDIS_PORT | egrep -q '^[0-9]+$' ; then
_MANUAL_EXECUTION=true _MANUAL_EXECUTION=true
#Read the redis port #Read the redis port
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment