commit ebcffbb

merc  ·  2026-08-01 03:41:26 +0000 UTC
parent f26531c
add: check for configs dir and info to manpage
2 files changed,  +9, -3
M bs
M bs.1
M bs
+2, -0
1@@ -1,5 +1,7 @@
2 #!/bin/sh
3 
4+[ -d /etc/sing-box/list ] || { echo "please mkdir /etc/sing-box/list/"; exit 1; }
5+
6 serviceNm="sing-box"
7 
8 m=0
M bs.1
+7, -3
 1@@ -5,18 +5,22 @@
 2 .Nm bs
 3 .Nd a shell script for easier use of sing-box core
 4 .Sh SYNOPSIS
 5+.Pp
 6+.Nm
 7+.Ar index | Ar cfg-name
 8 .Bl -tag -width Ds
 9 .It Fl L , Fl -list
10-list available configs
11+list available configs and their index
12 .It Fl C , Fl -current
13 show the currently used config
14 .It Fl S , Fl -stop
15 stop the sing-box service and clean up
16 .El
17 .Sh DESCRIPTION
18-.Nm
19-switches between .json configs from
20+.Pp
21+place your configs in
22 .Pa /etc/sing-box/list/
23+as individual .json files.
24 .Pp
25 the selected config is symlinked to
26 .Pa /etc/sing-box/config.json