Fix restarts of systemctl and dokku-installer

We previously assumed that systemd was detectable by the existence of certain directories. Unfortunately, it seems 14.04 already has these directories, so we need to handle this case separately.

One other note is that dokku-installer will fail to "start" if already started on certain systems, thus the previous grep was more accurate in it's running.
This commit is contained in:
Jose Diaz-Gonzalez committed 2016-01-02 02:29:57 -05:00
1 parent 932e8191ad
commit cac272a247
1 file changed
+7 -2
+7 -2
View File
@@ -56,8 +56,13 @@ case "$1" in
/usr/share/dokku/contrib/dokku-installer.py onboot /usr/share/dokku/contrib/dokku-installer.py onboot
echo "Starting dokku-installer" echo "Starting dokku-installer"
[[ -f /etc/systemd/system ]] && systemctl daemon-reload if command -v systemctl &>/dev/null; then
service dokku-installer start systemctl daemon-reload
fi
if service dokku-installer status 2> /dev/null | grep -E "waiting|inactive" ; then
service dokku-installer start
fi
fi fi
db_get "dokku/web_config" db_get "dokku/web_config"