diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-03-01 14:38:33 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-03-01 14:38:33 +0200 |
commit | 2c1dadf712ca63169f2e1c00a00e4fe03c65cf3b (patch) | |
tree | bfe7b68df9b2b127774baad1be571dbf1af239c1 /snap/hooks/configure | |
parent | 6fc89a04de3820e5bd356c33389537a148d5ca2a (diff) | |
parent | bbca361aeb8e0216d6fd9ace5ac17e777aad3524 (diff) | |
download | wekan-2c1dadf712ca63169f2e1c00a00e4fe03c65cf3b.tar.gz wekan-2c1dadf712ca63169f2e1c00a00e4fe03c65cf3b.tar.bz2 wekan-2c1dadf712ca63169f2e1c00a00e4fe03c65cf3b.zip |
Merge branch 'devel'
Diffstat (limited to 'snap/hooks/configure')
-rwxr-xr-x | snap/hooks/configure | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/snap/hooks/configure b/snap/hooks/configure index 5dcea5b9..f2f4cda1 100755 --- a/snap/hooks/configure +++ b/snap/hooks/configure @@ -1,6 +1,6 @@ #!/bin/bash -exec >> $SNAP_COMMON/hook.log 2>&1 +exec >> $SNAP_DATA/hook.log 2>&1 echo "$(date '+%Y-%m-%d %H:%M:%S') $0: Entering hook" set -x @@ -17,8 +17,8 @@ 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 + snapctl restart ${SNAP_NAME}.caddy 2>&1 || true else snapctl stop --disable ${SNAP_NAME}.caddy 2>&1 || true fi @@ -27,8 +27,8 @@ 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 + snapctl restart ${SNAP_NAME}.mongodb 2>&1 || true fi # restart all services |