2020-11-01 00:38:46 +00:00
|
|
|
#!/bin/bash
|
2021-04-19 14:45:20 +00:00
|
|
|
if [ "$1" == "" ]; then
|
2020-11-01 00:38:46 +00:00
|
|
|
echo "DISABLED|BAPSicle Server"
|
2021-04-19 14:45:20 +00:00
|
|
|
echo "----"
|
|
|
|
if curl --output /dev/null --silent --fail --max-time 1 "http://localhost:13500/"
|
|
|
|
then
|
|
|
|
echo "Presenter"
|
|
|
|
echo "Server"
|
2020-11-01 00:38:46 +00:00
|
|
|
echo "----"
|
2021-04-19 14:45:20 +00:00
|
|
|
echo "Restart Server"
|
|
|
|
echo "Stop Server"
|
|
|
|
else
|
|
|
|
echo "DISABLED|Presenter"
|
|
|
|
echo "DISABLED|Server"
|
|
|
|
echo "----"
|
|
|
|
echo "Start Server"
|
|
|
|
fi
|
2020-11-01 00:38:46 +00:00
|
|
|
exit
|
|
|
|
fi
|
2021-04-19 14:45:20 +00:00
|
|
|
if [ "$1" == "Stop Server" ]; then
|
|
|
|
curl --output /dev/null --silent "http://localhost:13500/quit"
|
|
|
|
elif [ "$1" == "Restart Server" ]; then
|
|
|
|
curl --output /dev/null --silent "http://localhost:13500/restart"
|
2020-11-01 00:38:46 +00:00
|
|
|
else
|
|
|
|
./BAPSicle "$1"
|
|
|
|
fi
|