summaryrefslogtreecommitdiffstats
path: root/snap/hooks/configure
diff options
context:
space:
mode:
authorOndrej Kubik <ondrej.kubik@canonical.com>2018-02-22 11:47:53 +0000
committerOndrej Kubik <ondrej.kubik@canonical.com>2018-02-22 11:48:33 +0000
commite3bd1c4d23baefa9a321b6501c2ea1ae5893aaa3 (patch)
tree93a16386439b6a84d41966d5d3c5e7b41960e315 /snap/hooks/configure
parentf7b72a1a8030c4b49f4c15ebae82cdbcf8b5f259 (diff)
downloadwekan-e3bd1c4d23baefa9a321b6501c2ea1ae5893aaa3.tar.gz
wekan-e3bd1c4d23baefa9a321b6501c2ea1ae5893aaa3.tar.bz2
wekan-e3bd1c4d23baefa9a321b6501c2ea1ae5893aaa3.zip
Adding mongodb service control to configure hook
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
Diffstat (limited to 'snap/hooks/configure')
-rwxr-xr-xsnap/hooks/configure7
1 files changed, 7 insertions, 0 deletions
diff --git a/snap/hooks/configure b/snap/hooks/configure
index 5d121e15..89ada296 100755
--- a/snap/hooks/configure
+++ b/snap/hooks/configure
@@ -22,5 +22,12 @@ 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 start --enable ${SNAP_NAME}.mongodb 2>&1 || true
+fi
+
# restart all services
snapctl restart ${SNAP_NAME} 2>&1 || true