diff --git a/debian/postinst b/debian/postinst index 8e64bc19d..ac206d54d 100755 --- a/debian/postinst +++ b/debian/postinst @@ -51,9 +51,13 @@ case "$1" in rm -f ${DOKKU_ROOT}/VERSION cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION - echo "starting dokku-installer if necessary" - if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then - sudo service dokku-installer start + if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then + echo "Setting up dokku-installer" + /usr/local/share/dokku/contrib/dokku-installer.py onboot + + echo "Starting dokku-installer" + [[ -f /etc/systemd/system ]] && systemctl daemon-reload + service dokku-installer start fi db_get "dokku/web_config" diff --git a/debian/preinst b/debian/preinst index 65f04f69c..9efc00b1b 100755 --- a/debian/preinst +++ b/debian/preinst @@ -7,14 +7,8 @@ case "$1" in install) db_get "dokku/web_config" if [ "$RET" = "true" ]; then - INIT_CONF="/etc/init/dokku-installer.conf" NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf" - rm -f $INIT_CONF - touch $INIT_CONF - echo 'start on runlevel [2345]' >> $INIT_CONF - echo 'exec /usr/local/share/dokku/contrib/dokku-installer.py selfdestruct' >> $INIT_CONF - rm -f $NGINX_CONF touch $NGINX_CONF