commit 1c95e42cef6bd606e6fff5c3975d489a4c95e727 parent fc031e0d74c477dea5f1cfdc58a5073719d5d873 Author: awy <awy@awy.one> Date: Mon, 14 Apr 2025 02:27:14 +0300 singboxwrap Diffstat:
M | .local/bin/singboxwrap | | | 12 | +++++++----- |
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/.local/bin/singboxwrap b/.local/bin/singboxwrap @@ -6,11 +6,13 @@ default_path="${XDG_DATA_HOME:-$HOME/.local/share}/singboxcfg" input=$1 run_singbox () { - sing-box check -c "$1" && { - pidof sing-box >/dev/null && killall sing-box - setsid -f sing-box -c "$1" run - notify-send "sing-box with $(readlink "$1") is running now" - } || notify-send "Config check has failed. Check your configuration at $(readlink $1)" & exit 1 + sing-box check -c "$1" && { + pidof sing-box >/dev/null && killall sing-box + setsid -f sing-box -c "$1" run + if [ "$input" = menu ]; then + notify-send "sing-box with $(readlink "$1") is running now" + fi + } || notify-send "Config check has failed. Check your configuration at $(readlink $1)" & exit 1 } choose_menu () {