File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- exec >> $SNAP_COMMON /hook.log 2>&1
3
+ exec >> $SNAP_DATA /hook.log 2>&1
4
4
echo " $( date ' +%Y-%m-%d %H:%M:%S' ) $0 : Entering hook"
5
5
6
6
set -x
@@ -17,8 +17,8 @@ if [ "$value" = "true" ]; then
17
17
port=$( snapctl get port)
18
18
[ " x" != " x${bind_port} " ] && sed -i ' s|proxy / localhost:.* {|proxy / localhost:' " ${bind_port} " ' {|g' $SNAP_COMMON /Caddyfile
19
19
[ " x" != " x$port " ] && sed -i ' s|http://:.*|http://:' " ${port} " ' |g' $SNAP_COMMON /Caddyfile
20
- snapctl stop ${SNAP_NAME} .caddy 2>&1 || true
21
20
snapctl start --enable ${SNAP_NAME} .caddy 2>&1 || true
21
+ snapctl restart ${SNAP_NAME} .caddy 2>&1 || true
22
22
else
23
23
snapctl stop --disable ${SNAP_NAME} .caddy 2>&1 || true
24
24
fi
@@ -27,8 +27,8 @@ value=$(snapctl get disable-mongodb)
27
27
if [ " $value " = " true" ]; then
28
28
snapctl stop --disable ${SNAP_NAME} .mongodb 2>&1 || true
29
29
else
30
- snapctl stop ${SNAP_NAME} .mongodb 2>&1 || true
31
30
snapctl start --enable ${SNAP_NAME} .mongodb 2>&1 || true
31
+ snapctl restart ${SNAP_NAME} .mongodb 2>&1 || true
32
32
fi
33
33
34
34
# restart all services
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- exec >> $SNAP_COMMON /hook.log 2>&1
3
+ exec >> $SNAP_DATA /hook.log 2>&1
4
4
echo " $( date ' +%Y-%m-%d %H:%M:%S' ) $0 : Entering hook"
5
5
6
6
# coppy caddy file in place
You can’t perform that action at this time.
0 commit comments