mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
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>
This commit is contained in:
parent
fcd7097aba
commit
9c9694bcd1
1 changed files with 4 additions and 5 deletions
9
snap/hooks/configure
vendored
9
snap/hooks/configure
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue