From 932e8191ad306e5538b429b8f1d6320f3af08305 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 2 Jan 2016 00:52:04 -0500 Subject: [PATCH] Revert "Fix issue where installer created dokku-installer for both upstart and systemd" This reverts commit 1581884c6d6134f00c7d2671d40deff06b4822a8. --- contrib/dokku-installer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/dokku-installer.py b/contrib/dokku-installer.py index bf11abaee..8d824f12b 100755 --- a/contrib/dokku-installer.py +++ b/contrib/dokku-installer.py @@ -38,6 +38,10 @@ def check_boot(): systemd_dir = os.getenv('SYSTEMD_DIR', '/etc/systemd/system') nginx_dir = os.getenv('NGINX_DIR', '/etc/nginx/conf.d') + if os.path.exists(init_dir): + with open('{0}/dokku-installer.conf'.format(init_dir), 'w') as f: + f.write("start on runlevel [2345]\n") + f.write("exec {0} selfdestruct\n".format(os.path.abspath(__file__))) if os.path.exists(systemd_dir): with open('{0}/dokku-installer.service'.format(systemd_dir), 'w') as f: f.write("[Unit]\n") @@ -49,10 +53,6 @@ def check_boot(): f.write("[Install]\n") f.write("WantedBy=multi-user.target\n") f.write("WantedBy=graphical.target\n") - elif os.path.exists(init_dir): - with open('{0}/dokku-installer.conf'.format(init_dir), 'w') as f: - f.write("start on runlevel [2345]\n") - f.write("exec {0} selfdestruct\n".format(os.path.abspath(__file__))) if os.path.exists(nginx_dir): with open('{0}/dokku-installer.conf'.format(nginx_dir), 'w') as f: f.write("upstream dokku-installer { server 127.0.0.1:2000; }\n")