Correctly handle dokku-installer init file creation on systemd instances
- Use the nginx.conf file's existence as a check for whether we should start the service or not - Create the init files with the dokku-installer.py file. This adds actual systemd support. - Also ensure we *always* start the service, regardless of it's status. This fixes an issue with processing systemd output
This commit is contained in:
1 parent
55b2aba3a8
commit
1314b3942d
2 files changed
+7
-9
No files matched your search
Vendored
+7
-3
@@ -51,9 +51,13 @@ case "$1" in
|
|||||||
rm -f ${DOKKU_ROOT}/VERSION
|
rm -f ${DOKKU_ROOT}/VERSION
|
||||||
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
|
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
|
||||||
|
|
||||||
echo "starting dokku-installer if necessary"
|
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
||||||
if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then
|
echo "Setting up dokku-installer"
|
||||||
sudo service dokku-installer start
|
/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
|
fi
|
||||||
|
|
||||||
db_get "dokku/web_config"
|
db_get "dokku/web_config"
|
||||||
|
|||||||
Vendored
-6
@@ -7,14 +7,8 @@ case "$1" in
|
|||||||
install)
|
install)
|
||||||
db_get "dokku/web_config"
|
db_get "dokku/web_config"
|
||||||
if [ "$RET" = "true" ]; then
|
if [ "$RET" = "true" ]; then
|
||||||
INIT_CONF="/etc/init/dokku-installer.conf"
|
|
||||||
NGINX_CONF="/etc/nginx/conf.d/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
|
rm -f $NGINX_CONF
|
||||||
touch $NGINX_CONF
|
touch $NGINX_CONF
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user