pull/68/head^2
233boy 6 years ago
parent a6a348b476
commit 31a548defc
  1. 5
      install.sh
  2. 6
      v2ray.sh

@ -773,6 +773,7 @@ install_caddy() {
if [[ $systemd ]]; then 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/
# sed -i "s/www-data/root/g" /lib/systemd/system/caddy.service # sed -i "s/www-data/root/g" /lib/systemd/system/caddy.service
sed -i "s/on-failure/always/" /lib/systemd/system/caddy.service
systemctl enable caddy systemctl enable caddy
else else
cp -f ${caddy_tmp}init/linux-sysvinit/caddy /etc/init.d/caddy cp -f ${caddy_tmp}init/linux-sysvinit/caddy /etc/init.d/caddy
@ -794,7 +795,8 @@ install_caddy() {
} }
caddy_config() { caddy_config() {
local email=$(shuf -i1-10000000000 -n1) # local email=$(shuf -i1-10000000000 -n1)
local email=$(((RANDOM << 22)))
case $v2ray_transport_opt in case $v2ray_transport_opt in
4) 4)
if [[ $path ]]; then if [[ $path ]]; then
@ -914,6 +916,7 @@ install_v2ray() {
if [[ $systemd ]]; then if [[ $systemd ]]; then
cp -f "/tmp/v2ray/v2ray-${v2ray_ver}-linux-${v2ray_bit}/systemd/v2ray.service" "/lib/systemd/system/" cp -f "/tmp/v2ray/v2ray-${v2ray_ver}-linux-${v2ray_bit}/systemd/v2ray.service" "/lib/systemd/system/"
sed -i "s/on-failure/always/" /lib/systemd/system/v2ray.service
systemctl enable v2ray systemctl enable v2ray
else else
apt-get install -y daemon apt-get install -y daemon

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v2.36" _version="v2.37"
cmd="apt-get" cmd="apt-get"
@ -1457,6 +1457,7 @@ install_caddy() {
if [[ $systemd ]]; then 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/
# sed -i "s/www-data/root/g" /lib/systemd/system/caddy.service # sed -i "s/www-data/root/g" /lib/systemd/system/caddy.service
sed -i "s/on-failure/always/" /lib/systemd/system/caddy.service
systemctl enable caddy systemctl enable caddy
else else
cp -f ${caddy_tmp}init/linux-sysvinit/caddy /etc/init.d/caddy cp -f ${caddy_tmp}init/linux-sysvinit/caddy /etc/init.d/caddy
@ -1477,7 +1478,8 @@ install_caddy() {
} }
caddy_config() { caddy_config() {
local email=$(shuf -i1-10000000000 -n1) # local email=$(shuf -i1-10000000000 -n1)
local email=$(((RANDOM << 22)))
case $v2ray_transport in case $v2ray_transport in
4) 4)
if [[ $is_path ]]; then if [[ $is_path ]]; then

Loading…
Cancel
Save