diff options
author | Ondrej Kubik <ondrej.kubik@canonical.com> | 2017-12-06 14:49:18 +0000 |
---|---|---|
committer | Ondrej Kubik <ondrej.kubik@canonical.com> | 2018-02-21 22:29:24 +0000 |
commit | 9c9694bcd127810cf37667bc3ddc9ef7558996d3 (patch) | |
tree | 851e7c445ce23e97ae6dfd5b1e32784d3695e59c /snap/hooks | |
parent | fcd7097ababeed2b396fcee23aaf76f4973a1530 (diff) | |
download | wekan-9c9694bcd127810cf37667bc3ddc9ef7558996d3.tar.gz wekan-9c9694bcd127810cf37667bc3ddc9ef7558996d3.tar.bz2 wekan-9c9694bcd127810cf37667bc3ddc9ef7558996d3.zip |
Fixing snapctl start/stop to control service lifecycle
Adding disable and enable options for snapctl start/stop
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
Diffstat (limited to 'snap/hooks')
-rwxr-xr-x | snap/hooks/configure | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/snap/hooks/configure b/snap/hooks/configure index 15d68a19..b215cc85 100755 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -15,11 +15,10 @@ if [ "$value" = "true" ]; then port=$(snapctl get port) [ "x" != "x${bind_port}" ] && sed -i 's|proxy / localhost:.* {|proxy / localhost:'"${bind_port}"' {|g' $SNAP_COMMON/Caddyfile [ "x" != "x$port" ] && sed -i 's|http://:.*|http://:'"${port}"'|g' $SNAP_COMMON/Caddyfile - snapctl start caddy-service 2>&1 || true + snapctl start --enable ${SNAP_NAME}.caddy 2>&1 || true else - snapctl stop caddy-service 2>&1 || true + snapctl stop --disable ${SNAP_NAME}.caddy 2>&1 || true fi -# restart mongo and wekan service -snapctl restart mongodb 2>&1 || true -snapctl restart wekan 2>&1 || true +# restart all services +snapctl restart ${SNAP_NAME} 2>&1 || true |