Skip to content

Commit

Permalink
use new caddy.service
Browse files Browse the repository at this point in the history
  • Loading branch information
233boy committed Oct 12, 2019
1 parent eab6857 commit 97d78c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/download-caddy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,7 +43,7 @@ _install_caddy_service() {
# Documentation=https://caddyserver.com/docs
# After=network.target
# Wants=network.target

# [Service]
# Restart=always
# RestartSec=3
Expand All @@ -52,7 +55,7 @@ _install_caddy_service() {
# TimeoutStopSec=5s
# LimitNOFILE=1048576
# LimitNPROC=512

# [Install]
# WantedBy=multi-user.target
# EOF
Expand Down
2 changes: 1 addition & 1 deletion v2ray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 97d78c8

Please sign in to comment.