From e3bd1c4d23baefa9a321b6501c2ea1ae5893aaa3 Mon Sep 17 00:00:00 2001 From: Ondrej Kubik Date: Thu, 22 Feb 2018 11:47:53 +0000 Subject: Adding mongodb service control to configure hook Signed-off-by: Ondrej Kubik --- snap/hooks/configure | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'snap') 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 -- cgit v1.2.3-1-g7c22