Fix virtual environment

* Fix virtual environment
* Support os ubuntu 20+ - debian 11+
This commit is contained in:
Whispering Wind
2024-08-14 21:02:07 +03:30
committed by GitHub
4 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
0.1.6
0.1.7

View File

@ -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

View File

@ -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

View File

@ -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