From bb525a3cf1a575c50dac7a1b7de762cf8745a13a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 2 Jan 2016 03:53:27 -0500 Subject: [PATCH] Properly handle dokku-installer installation --- debian/postinst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/debian/postinst b/debian/postinst index 2493a9b41..e6dce02b9 100755 --- a/debian/postinst +++ b/debian/postinst @@ -55,13 +55,14 @@ case "$1" in echo "Setting up dokku-installer" /usr/share/dokku/contrib/dokku-installer.py onboot - echo "Starting dokku-installer" if command -v systemctl &>/dev/null; then - systemctl daemon-reload + echo "Enabling dokku-installer" + systemctl enable dokku-installer fi - if service dokku-installer status 2> /dev/null | grep -E "waiting|inactive" ; then - service dokku-installer start + if echo $(service dokku-installer status 2> /dev/null || true) | grep -Eq "(inactive|waiting)" > /dev/null; then + echo "Starting dokku-installer" + service dokku-installer start || echo "Unable to start dokku-installer" fi fi