Enable nginx service before downloading default config

This commit is contained in:
Alex Thomassen 2022-04-20 14:31:17 +02:00
parent 80f456f047
commit f0c3e016c6
Signed by: Alex
GPG Key ID: 10BD786B5F6FF5DE
1 changed files with 7 additions and 0 deletions

View File

@ -90,6 +90,13 @@ curl -L "$GIST/phpfpm.conf" > "$NGINX/phpfpm.conf"
# Get the dhparams file generation script, and execute.
curl -L "$GIST/generate-dhparams.sh" | sudo bash
# Check if systemd is installed and enable the service.
# Since I usually just install stock Debian with systemd, this may not be required.
CHECK_SYSTEMD=$(whereis systemctl)
if [[ $? -eq 0 ]]; then
systemctl enable --now nginx
fi
if [[ $DOWNLOAD_DEFAULT != 0 ]]; then
curl -L "$GIST/$DEFAULT_NAME" > "$DEFAULT_DIR/$DEFAULT_NAME"
fi