almost finaly
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if pgrep -x "v2raya" > /dev/null; then
|
||||
if [ "$1" = "toggle" ]; then
|
||||
sudo systemctl stop v2raya.service 2>/dev/null || sudo killall v2raya
|
||||
echo "{\"text\": \" \", \"class\": \"disabled\", \"tooltip\": \"v2rayA выключен\"}"
|
||||
else
|
||||
echo "{\"text\": \" \", \"class\": \"enabled\", \"tooltip\": \"v2rayA включен\"}"
|
||||
fi
|
||||
else
|
||||
if [ "$1" = "toggle" ]; then
|
||||
sudo systemctl start v2raya.service 2>/dev/null || sudo v2raya --daemon &
|
||||
echo "{\"text\": \" \", \"class\": \"enabled\", \"tooltip\": \"v2rayA включен\"}"
|
||||
else
|
||||
echo "{\"text\": \" \", \"class\": \"disabled\", \"tooltip\": \"v2rayA выключен\"}"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user