Skip to content

Commit 6780fb7

Browse files
author
drscholl
committed
added napchk script from wolf
MISSING LOG ENTRIES: added -b command line option to run opennap in the background. $config_dir/log is opened as stdout to catch output from the process. the pid is now stored in $config_dir/pid when opennap starts up to facilitate external scripts to restart it when it dies configure now checks for mlockall() split Win32 and Unix installation notes into separate files for clarity updated TODO file the global MD5 hash table should not be compiled in when RESUME is undefined, and the garbage collection should not be scheduled (was causing a crash in the win32 build) ignore search matches when both parties are firewalled added README.WIN32 and README.UNIX to EXTRA_DIST check for valid (>0) file size when adding files privileged users should see who send publics and emotes even when other users are cloaked. Current_Time needs to be set in mkpass.c prior to calling init_random() corrected mispelling of 'Foreward' in napster.txt
1 parent 57a08ed commit 6780fb7

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

Makefile.am

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ metaserver_SOURCES=metaserver.c
1515
EXTRA_DIST=sample.conf sample.motd napster.txt .indent.pro \
1616
FAQ patchnap.c spyserv.c opennap.dsw opennap.dsp \
1717
opennap.opt sample.users sample.servers opennap.spec \
18-
getopt.c mkpass.dsp sample.channels README.WIN32 README.UNIX
18+
getopt.c mkpass.dsp sample.channels README.WIN32 README.UNIX \
19+
napchk
1920
INCLUDES=-DSHAREDIR=\"$(pkgdatadir)\"

napchk

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/sh
2+
# OpenNAP crontab checking file, used to restart your OpenNAP server
3+
# if for some reason it crashed, or the host system reboots.
4+
#
5+
# To check to see if your OpenNAP server is running do one of the
6+
# following (10 minute intervals):
7+
#
8+
# 0,10,20,30,40,50 * * * * /home/mydir/napchk
9+
#
10+
# If you do not wish to recieve email when your OpenNAP server was
11+
# restarted, do the following:
12+
#
13+
# 0,10,20,30,40,50 * * * * /home/mydir/napchk >/dev/null 2>&1
14+
#
15+
# -- WoLf ([email protected])
16+
17+
# Set this to the home opennap path
18+
OPENNAPPATH=/home/wolf/opennap
19+
20+
# Set this to the opennap shared folder path
21+
OPENNAPSHAREPATH=$OPENNAPPATH/share/opennap
22+
23+
# Set this to the path where opennap binary is located
24+
OPENNAPBINPATH=$OPENNAPPATH/bin
25+
26+
# The rest should not need to be changed.
27+
28+
cd $OPENNAPSHAREPATH
29+
if test -r pid; then
30+
OPENNAPPID=$(cat pid)
31+
if $(kill -CHLD $OPENNAPPID >/dev/null 2>&1); then
32+
# OpenNAP is still running, Exit
33+
exit 0
34+
fi
35+
echo ""
36+
echo "Found an old pid file, Removing..."
37+
rm -f pid
38+
fi
39+
echo ""
40+
echo "OpenNAP is not running, Restarting..."
41+
echo ""
42+
43+
cd $OPENNAPBINPATH
44+
if test -r opennap ;then
45+
./opennap -b
46+
exit 0
47+
fi
48+
echo "Could not reload OpenNAP"
49+
exit 0

0 commit comments

Comments
 (0)