Add shell scripts for auto-starting and operating evennia on a server.

This commit is contained in:
Griatch 2016-12-08 23:53:48 +01:00
parent 293c3b077d
commit bffc8b04d8
2 changed files with 110 additions and 0 deletions

View file

@ -0,0 +1,36 @@
#
# Evennia init.d Screen launcher script (Linux)
#
# This requires a Linux using init.d. I is used togeter
# with the evennia-screen.sh script, which must be working
# before setting this one up. This script is meant to be
# used as part of Linux' automatic services and requires
# root to set up.
#
# Usage:
# 1. sudo cp evennia-screen-initd.sh /etc/init.d/evennia
# 2. cd /etc/init.d
# 3. Edit this script (now renamed to 'evennia') and
# change SCRIPTPATH and USER below to fit your setup.
# 4. sudo chown root:root evennia
# 5. sudo chmod 755 evennia
#
# You can now use (as root) ´services evennia start|stop|reload`
# to operate the server. The server will run as the USER you
# specify and must thus have access to start the server
# (*don't* set it to run as root!).
#
# To make Evennia auto-start when the server reboots, run
# the following:
#
# sudo update-rc.d evennia defaults 91
#
# CHANGE to fit your setup (obs: no spaces around the '=')
SCRIPTPATH="/home/muddev/mud/mygame/server/evennia-screen.sh"
USER="muddev"
#------------------------------------------------------------
su - "$USER" -c "$SCRIPTPATH $1"