From 5c647ffcc3fb1c69478dae70591c3cfed54fa237 Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Sat, 8 Jun 2019 10:39:08 +0800 Subject: [PATCH] update caddy service --- src/download-caddy.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/download-caddy.sh b/src/download-caddy.sh index e870808..80a8014 100644 --- a/src/download-caddy.sh +++ b/src/download-caddy.sh @@ -27,6 +27,7 @@ _install_caddy_service() { if [[ $systemd ]]; then cp -f ${caddy_tmp}init/linux-systemd/caddy.service /lib/systemd/system/ # sed -i "s/www-data/root/g" /lib/systemd/system/caddy.service + sed -i "/on-abnormal/a RestartSec=3" /lib/systemd/system/caddy.service sed -i "s/on-abnormal/always/" /lib/systemd/system/caddy.service systemctl enable caddy else @@ -44,4 +45,7 @@ _install_caddy_service() { chown -R www-data.www-data /etc/ssl/caddy mkdir -p /etc/caddy/ -} + + ## create sites dir + mkdir -p /etc/caddy/sites +} \ No newline at end of file