Skip to content

Commit e94b013

Browse files
committed
fixed bug in restart function
1 parent 8c85420 commit e94b013

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

func/shared.func

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -674,15 +674,11 @@ get_user_value() {
674674

675675
restart_schedule() {
676676
type="$1"
677-
period="$2"
678-
679-
# Checking period
680-
if [ -z "$period" ]; then
681-
period=$(grep 'RESTART_PERIOD=' $V_CONF/vesta.conf | cut -f 2 -d \')
677+
if [ -z "$RESTART_PERIOD" ]; then
678+
RESTART_PERIOD=0
682679
fi
683-
684-
if [ "$period" -le 0 ]; then
685-
$V_FUNC/restart_"$type"
680+
if [ "$RESTART_PERIOD" -le 0 ]; then
681+
$V_BIN/v_restart_"$type"
686682
else
687683
echo "$type" >> $V_QUEUE/restart.pipe
688684
fi

0 commit comments

Comments
 (0)