From 97d78c82848dd210d44a8fb6a61916e88c7e67f5 Mon Sep 17 00:00:00 2001 From: 233boy <31657650+233boy@users.noreply.github.com> Date: Sat, 12 Oct 2019 17:31:39 +0800 Subject: [PATCH] use new caddy.service --- src/download-caddy.sh | 9 ++++++--- v2ray.sh | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/download-caddy.sh b/src/download-caddy.sh index 692386f..36f9b5e 100644 --- a/src/download-caddy.sh +++ b/src/download-caddy.sh @@ -26,7 +26,10 @@ _install_caddy_service() { setcap CAP_NET_BIND_SERVICE=+eip /usr/local/bin/caddy if [[ $systemd ]]; then - cp -f ${caddy_tmp}init/linux-systemd/caddy.service /lib/systemd/system/ + # cp -f ${caddy_tmp}init/linux-systemd/caddy.service /lib/systemd/system/ + if ! wget https://raw.githubusercontent.com/caddyserver/caddy/master/dist/init/linux-systemd/caddy.service -O /lib/systemd/system/caddy.service; then + echo -e "$red 下载 caddy.service 失败!$none" && exit 1 + fi # # 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 @@ -40,7 +43,7 @@ _install_caddy_service() { # Documentation=https://caddyserver.com/docs # After=network.target # Wants=network.target - + # [Service] # Restart=always # RestartSec=3 @@ -52,7 +55,7 @@ _install_caddy_service() { # TimeoutStopSec=5s # LimitNOFILE=1048576 # LimitNPROC=512 - + # [Install] # WantedBy=multi-user.target # EOF diff --git a/v2ray.sh b/v2ray.sh index 18b8d3e..a9ddfbe 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -10,7 +10,7 @@ none='\e[0m' # Root [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 -_version="v3.16" +_version="v3.17" cmd="apt-get"