Adding mongodb service control to configure hook

Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
This commit is contained in:
Ondrej Kubik 2018-02-22 11:47:53 +00:00
parent f7b72a1a80
commit e3bd1c4d23

View file

@ -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