SWG Service
These files will help you run your SWG Server with systemd so that you don't have to keep two terminals open the whole time it's running. It might be helpful for something like a headless home server, especially if you don't want to have a gui installed.
Usage
Clone or download this repository and open a terminal in whatever directory you've cloned to. Copy the service files to /etc/systemd/system:
sudo cp *.service /etc/systemd/system
These files were written with SWG Source's VM in mind. If you're running something else, make sure to change any values that might need to be different for your system.
Starting your server
Start stationchat like this:
sudo systemctl start stationchat
Start the SWG Server like this:
sudo systemctl start swg
If you start your client right away and log in, you'll see that your cluster is loading. After a while, the status will change to Online.
By default, this service will output all the stuff that would usually end up in the console to /home/swg/swg-main/output.log just in case you need to check its output.
To shutdown the server (recommended method)
Run your /server shutdown 1 1 1 command from an admin character in-game. Launch htop and watch for the RAM usage to suddenly go way down. This probably indicates that your server has finished shutting down safely. You can then run the following commands to kill your processes:
sudo systemctl stop swg
sudo systemctl stop stationchat
That's it!
Note: You probably cannot enable these services to run at boottime. Obviously, Oracle DB is a pre-requesite and has to be started up first. I'm sure it can be done, I just didn't do it.
Have I messed something up or done something totally wrong? Please open an issue or submit a pull request!