summaryrefslogtreecommitdiffstats
path: root/snap
diff options
context:
space:
mode:
Diffstat (limited to 'snap')
-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