diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-02-22 21:50:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 21:50:41 +0200 |
commit | 435501fb8e5a5d68c3e9e05fff5c6ee24a3f9166 (patch) | |
tree | 45811552a3ed967c651be4895b4b0b182d6407d1 /snap/hooks/configure | |
parent | 31f25bcddbc8e3a1f0e2c657d7189da2e10f4c49 (diff) | |
parent | fd47e10e523ab687a470484ee62e502cf82bf7bd (diff) | |
download | wekan-435501fb8e5a5d68c3e9e05fff5c6ee24a3f9166.tar.gz wekan-435501fb8e5a5d68c3e9e05fff5c6ee24a3f9166.tar.bz2 wekan-435501fb8e5a5d68c3e9e05fff5c6ee24a3f9166.zip |
Merge pull request #1500 from kubiko/devel
service life cycle improvements
Diffstat (limited to 'snap/hooks/configure')
-rwxr-xr-x | snap/hooks/configure | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/snap/hooks/configure b/snap/hooks/configure index 5d121e15..5dcea5b9 100755 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -17,10 +17,19 @@ 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 stop ${SNAP_NAME}.caddy 2>&1 || true snapctl start --enable ${SNAP_NAME}.caddy 2>&1 || true else snapctl stop --disable ${SNAP_NAME}.caddy 2>&1 || true fi +value=$(snapctl get disable-mongodb) +if [ "$value" = "true" ]; then + snapctl stop --disable ${SNAP_NAME}.mongodb 2>&1 || true +else + snapctl stop ${SNAP_NAME}.mongodb 2>&1 || true + snapctl start --enable ${SNAP_NAME}.mongodb 2>&1 || true +fi + # restart all services -snapctl restart ${SNAP_NAME} 2>&1 || true +snapctl restart ${SNAP_NAME}.wekan 2>&1 || true |