Files
swg-main/swgtool.sh
2020-02-02 16:06:04 -05:00

37 lines
578 B
Bash
Executable File

#!/bin/bash
if [ "$1" = "start" ]; then
sudo systemctl start stationchat.service
sleep 1
sudo systemctl start swg.service
exit 0
fi
if [ "$1" = "stop" ]; then
sudo systemctl stop swg.service
sleep 1
sudo systemctl stop stationchat.service
exit 0
fi
if [ "$1" = "update" ]; then
echo "Checking for swg-main updates first..."
git pull
./include/update.sh
exit 0
fi
echo "SWG Tool
Usage: ./swgtool.sh {command}
Available Commands:
start
Starts up the SWG Server.
stop
Stops the SWG Server.
update
Looks for updates and recompiles if any are found."