diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/lambdamoo/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/lambdamoo/files')
-rw-r--r-- | net-misc/lambdamoo/files/1.8.1-enable-outbound.patch | 13 | ||||
-rw-r--r-- | net-misc/lambdamoo/files/lambdamoo.conf | 6 | ||||
-rw-r--r-- | net-misc/lambdamoo/files/lambdamoo.rc | 47 |
3 files changed, 66 insertions, 0 deletions
diff --git a/net-misc/lambdamoo/files/1.8.1-enable-outbound.patch b/net-misc/lambdamoo/files/1.8.1-enable-outbound.patch new file mode 100644 index 000000000000..b96e013683b8 --- /dev/null +++ b/net-misc/lambdamoo/files/1.8.1-enable-outbound.patch @@ -0,0 +1,13 @@ +diff -ur MOO-1.8.1.orig/options.h MOO-1.8.1/options.h +--- MOO-1.8.1.orig/options.h 2003-04-17 15:25:25.000000000 -0500 ++++ MOO-1.8.1/options.h 2003-04-17 15:27:33.000000000 -0500 +@@ -155,7 +155,7 @@ + * NP_SINGLE or NP_LOCAL. + */ + +-/* #define OUTBOUND_NETWORK */ ++#define OUTBOUND_NETWORK + + /****************************************************************************** + * The following constants define certain aspects of the server's network + diff --git a/net-misc/lambdamoo/files/lambdamoo.conf b/net-misc/lambdamoo/files/lambdamoo.conf new file mode 100644 index 000000000000..3f84faefe344 --- /dev/null +++ b/net-misc/lambdamoo/files/lambdamoo.conf @@ -0,0 +1,6 @@ +# The full path to your database, without the extention. +# For example: +DB_PREFIX=/usr/share/lambdamoo/Minimal + +# The port LambdaMOO should listen for incoming connections on +PORT=7777 diff --git a/net-misc/lambdamoo/files/lambdamoo.rc b/net-misc/lambdamoo/files/lambdamoo.rc new file mode 100644 index 000000000000..2a641acc4ba9 --- /dev/null +++ b/net-misc/lambdamoo/files/lambdamoo.rc @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# adapted from Pavel Curtis' restart.sh + +depend() { + need net +} + +check_setup() { + if [ ! -r ${DB_PREFIX}.db ] ; then + eerror "Unable to read ${DB_PREFIX}.db" + return 1 + fi + + if [ -r ${DB_PREFIX}.db.new ] ; then + mv ${DB_PREFIX}.db ${DB_PREFIX}.db.old + mv ${DB_PREFIX}.db.new ${DB_PREFIX}.db + #Pavel compressed the old db here, I have not to save start time. + fi + + if [ -f /var/log/lambdamoo.log ] ; then + cat /var/log/lambdamoo.log >> /var/log/lambdamoo.log.old + rm /var/log/lambdamoo.log + fi + + return 0 +} + +start() { + check_setup || return 1 + + ebegin "Starting LambdaMOO" + echo "`date`: RESTARTED" >> ${DB_PREFIX}.log + start-stop-daemon --start --startas /usr/sbin/moo \ + --pidfile /var/run/LambdaMOO.pid --make-pidfile \ + -- -l /var/log/lambdamoo.log ${DB_PREFIX}.db ${DB_PREFIX}.db.new ${PORT} & + eend $? +} + +stop() { + ebegin "Stopping LambdaMOO" + start-stop-daemon -o --quiet --stop --pidfile /var/run/LambdaMOO.pid + eend $? + [ -f /var/run/LambdaMOO.pid ] && rm /var/run/LambdaMOO.pid +} |