Check installation
This commit is contained in:
7
menu.sh
7
menu.sh
@ -5,6 +5,12 @@ source /etc/hysteria/core/scripts/path.sh
|
|||||||
|
|
||||||
# OPTION HANDLERS (ONLY NEEDED ONE)
|
# OPTION HANDLERS (ONLY NEEDED ONE)
|
||||||
hysteria2_install_handler() {
|
hysteria2_install_handler() {
|
||||||
|
if systemctl is-active --quiet hysteria-server.service; then
|
||||||
|
echo "The hysteria-server.service is currently active."
|
||||||
|
echo "If you need to update the core, please use the 'Update Core' option."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Enter the new port number you want to use: " port
|
read -p "Enter the new port number you want to use: " port
|
||||||
if ! [[ "$port" =~ ^[0-9]+$ ]] || [ "$port" -lt 1 ] || [ "$port" -gt 65535 ]; then
|
if ! [[ "$port" =~ ^[0-9]+$ ]] || [ "$port" -lt 1 ] || [ "$port" -gt 65535 ]; then
|
||||||
@ -13,6 +19,7 @@ hysteria2_install_handler() {
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
python3 $CLI_PATH install-hysteria2 --port "$port"
|
python3 $CLI_PATH install-hysteria2 --port "$port"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user