diff --git a/VERSION b/VERSION index c946ee6..1180819 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.6 +0.1.7 diff --git a/core/scripts/singbox/singbox_shell.sh b/core/scripts/singbox/singbox_shell.sh index b7a6550..51c89ed 100644 --- a/core/scripts/singbox/singbox_shell.sh +++ b/core/scripts/singbox/singbox_shell.sh @@ -32,7 +32,7 @@ Description=Singbox Python Service After=network.target [Service] -ExecStart=/etc/hysteria/hysteria2_venv/bin/python /etc/hysteria/core/scripts/singbox/singbox.py +ExecStart=/bin/bash -c 'source /etc/hysteria/hysteria2_venv/bin/activate && /etc/hysteria/hysteria2_venv/bin/python /etc/hysteria/core/scripts/singbox/singbox.py' WorkingDirectory=/etc/hysteria/core/scripts/singbox EnvironmentFile=/etc/hysteria/core/scripts/singbox/.env Restart=always diff --git a/core/scripts/telegrambot/runbot.sh b/core/scripts/telegrambot/runbot.sh index 9fb1a2e..344b12e 100644 --- a/core/scripts/telegrambot/runbot.sh +++ b/core/scripts/telegrambot/runbot.sh @@ -19,7 +19,7 @@ Description=Hysteria Telegram Bot After=network.target [Service] -ExecStart=/etc/hysteria/hysteria2_venv/bin/python /etc/hysteria/core/scripts/telegrambot/tbot.py +ExecStart=/bin/bash -c 'source /etc/hysteria/hysteria2_venv/bin/activate && /etc/hysteria/hysteria2_venv/bin/python /etc/hysteria/core/scripts/telegrambot/tbot.py' WorkingDirectory=/etc/hysteria/core/scripts/telegrambot Restart=always User=root diff --git a/install.sh b/install.sh index 09ca9fb..c08d75a 100644 --- a/install.sh +++ b/install.sh @@ -22,8 +22,8 @@ source /etc/hysteria/hysteria2_venv/bin/activate pip install -r requirements.txt # Add alias 'hys2' for Hysteria2 -if ! grep -q "alias hys2='/etc/hysteria/menu.sh'" ~/.bashrc; then - echo "alias hys2='/etc/hysteria/menu.sh'" >> ~/.bashrc +if ! grep -q "alias hys2='source /etc/hysteria/hysteria2_venv/bin/activate && /etc/hysteria/menu.sh'" ~/.bashrc; then + echo "alias hys2='source /etc/hysteria/hysteria2_venv/bin/activate && /etc/hysteria/menu.sh'" >> ~/.bashrc source ~/.bashrc fi