Start if stopped (#776)

This commit is contained in:
Daniel Hansson 2019-01-23 22:38:38 +01:00 committed by GitHub
parent cf8898162d
commit fbdcc4e77f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

8
lib.sh
View File

@ -208,6 +208,14 @@ do
done
}
start_if_stopped() {
if ! pgrep "$1"
then
print_text_in_color "$ICyan" "Starting $1..."
check_command service "$1" start
fi
}
# Warn user that HTTP/2 will be disabled if installing app that use Apache2 PHP instead of PHP-FPM
# E.g: http2_warn Modsecurity
http2_warn() {

View File

@ -367,7 +367,7 @@ Please check in $BACKUP if the folders exist."
fi
# Start Apache2
check_command service apache2 start
start_if_stopped apache2
# Recover apps that exists in the backed up apps folder
run_static_script recover_apps