This commit is contained in:
Whispering Wind
2024-08-13 14:41:48 +03:30
committed by GitHub
parent ee87700d17
commit 81f6628a0b

View File

@ -14,7 +14,8 @@ FILES=(
echo "Backing up files to $TEMP_DIR" echo "Backing up files to $TEMP_DIR"
for FILE in "${FILES[@]}"; do for FILE in "${FILES[@]}"; do
cp "$FILE" "$TEMP_DIR" mkdir -p "$TEMP_DIR/$(dirname "$FILE")"
cp "$FILE" "$TEMP_DIR/$FILE"
done done
echo "Removing /etc/hysteria directory" echo "Removing /etc/hysteria directory"
@ -29,7 +30,7 @@ wget -O /etc/hysteria/geoip.dat https://raw.githubusercontent.com/Chocolate4U/Ir
echo "Restoring backup files" echo "Restoring backup files"
for FILE in "${FILES[@]}"; do for FILE in "${FILES[@]}"; do
cp "$TEMP_DIR/$(basename $FILE)" "$FILE" cp "$TEMP_DIR/$FILE" "$FILE"
done done
echo "Setting ownership and permissions" echo "Setting ownership and permissions"
@ -52,6 +53,7 @@ if systemctl is-active --quiet hysteria-server.service; then
else else
echo "Upgrade failed: hysteria-server.service is not active" echo "Upgrade failed: hysteria-server.service is not active"
fi fi
cd /etc/hysteria cd /etc/hysteria
chmod +x menu.sh chmod +x menu.sh
./menu.sh ./menu.sh