Removed comment
This commit is contained in:
@ -1,20 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Source the path.sh script to load the CONFIG_FILE variable
|
|
||||||
source /etc/hysteria/core/scripts/path.sh
|
source /etc/hysteria/core/scripts/path.sh
|
||||||
|
|
||||||
# Check if wg-quick@wgcf.service is active
|
|
||||||
if systemctl is-active --quiet wg-quick@wgcf.service; then
|
if systemctl is-active --quiet wg-quick@wgcf.service; then
|
||||||
echo "WARP is already active. Skipping installation and configuration update."
|
echo "WARP is already active. Skipping installation and configuration update."
|
||||||
else
|
else
|
||||||
echo "Installing WARP..."
|
echo "Installing WARP..."
|
||||||
bash <(curl -fsSL https://raw.githubusercontent.com/ReturnFI/Warp/main/warp.sh) wgx
|
bash <(curl -fsSL https://raw.githubusercontent.com/ReturnFI/Warp/main/warp.sh) wgx
|
||||||
|
|
||||||
# Check if the config file exists
|
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
if [ -f "$CONFIG_FILE" ]; then
|
||||||
# Add the outbound configuration to the config.json file
|
|
||||||
jq '.outbounds += [{"name": "warps", "type": "direct", "direct": {"mode": 4, "bindDevice": "wgcf"}}]' "$CONFIG_FILE" > /etc/hysteria/config_temp.json && mv /etc/hysteria/config_temp.json "$CONFIG_FILE"
|
jq '.outbounds += [{"name": "warps", "type": "direct", "direct": {"mode": 4, "bindDevice": "wgcf"}}]' "$CONFIG_FILE" > /etc/hysteria/config_temp.json && mv /etc/hysteria/config_temp.json "$CONFIG_FILE"
|
||||||
# Restart the hysteria-server service
|
|
||||||
python3 "$CLI_PATH" restart-hysteria2 > /dev/null 2>&1
|
python3 "$CLI_PATH" restart-hysteria2 > /dev/null 2>&1
|
||||||
echo "WARP installed and outbound added to config.json."
|
echo "WARP installed and outbound added to config.json."
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user