3 if [ -L "$self" ]; then
4 self=$(readlink -f "$0")
6 sock=$(dirname "$self")/request_handler_server.sock
10 if [ x"$1" = x"--daemon" -o x"$1" = x"-d" ]; then
13 if [ x"$1" = x"--attach" -o x"$1" = x"-a" ]; then
17 if [ ! -S $sock ]; then
21 # if none of the modes attach to it
22 if [ $daemon = 0 -a $attach = 0 ]; then
26 if [ "$daemon" = 1 ]; then
27 echo "Starting request_handler_server(s)"
30 tmux -S $sock new-session -d -s "request_handler_server" -n "http" "python3 request_handler_server.py" && \
31 exec tmux -S $sock new-window -d -t "request_handler_server" -n "https" "python3 request_handler_server.py ssl"
36 if [ "$attach" = 1 ]; then
37 echo "Attaching to request_handler_server(s)"
38 exec tmux -S $sock attach