diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-21 15:07:44 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-07-21 15:07:44 +0000 |
commit | d904771c3a09ec9c456d4f3b3de39c360cfda7c6 (patch) | |
tree | 2f159945f205b4c8a3ac19ecb50981607df4e42f /irc/ircd-hybrid/files | |
parent | 68e30f11e964a2c37894cbe5e0ba18488ea0b5bd (diff) | |
download | ports-d904771c3a09ec9c456d4f3b3de39c360cfda7c6.tar.gz ports-d904771c3a09ec9c456d4f3b3de39c360cfda7c6.zip |
Notes
Diffstat (limited to 'irc/ircd-hybrid/files')
-rw-r--r-- | irc/ircd-hybrid/files/include-config.h.pre-patch | 15 | ||||
-rw-r--r-- | irc/ircd-hybrid/files/ircd-hybrid.sh | 9 |
2 files changed, 19 insertions, 5 deletions
diff --git a/irc/ircd-hybrid/files/include-config.h.pre-patch b/irc/ircd-hybrid/files/include-config.h.pre-patch index af4df1dee821..d6c77943e5c5 100644 --- a/irc/ircd-hybrid/files/include-config.h.pre-patch +++ b/irc/ircd-hybrid/files/include-config.h.pre-patch @@ -1,5 +1,5 @@ ---- include/config.h.orig Thu Feb 6 01:46:11 2003 -+++ include/config.h Thu Jan 29 20:16:13 2004 +--- include/config.h.orig Sun Oct 26 03:08:12 2003 ++++ include/config.h Thu Jul 7 11:27:45 2005 @@ -90,7 +90,9 @@ /*#define IRCD_PREFIX "IRCD$BASEDIR:"*/ #define DPATH "IRCD$BASEDIR:" @@ -10,7 +10,7 @@ #define LOGPATH "IRCD$LOGDIR:" #undef MODPATH -@@ -134,13 +136,13 @@ +@@ -137,13 +139,13 @@ /* dirs */ #define DPATH IRCD_PREFIX #define BINPATH IRCD_PREFIX "/bin/" @@ -30,3 +30,12 @@ /* files */ #define SPATH BINPATH "/ircd" /* ircd executable */ +@@ -158,7 +160,7 @@ + #define RPATH ETCPATH "/ircd.rsa" /* ircd rsa private keyfile */ + #define MPATH ETCPATH "/ircd.motd" /* MOTD file */ + #define LPATH LOGPATH "/ircd.log" /* ircd logfile */ +-#define PPATH ETCPATH "/ircd.pid" /* pid file */ ++#define PPATH "/var/run/ircd.pid" /* pid file */ + #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */ + #define LIPATH ETCPATH "/links.txt" /* cached links file */ + #endif /* !VMS */ diff --git a/irc/ircd-hybrid/files/ircd-hybrid.sh b/irc/ircd-hybrid/files/ircd-hybrid.sh index 4e2918d5b67d..10751d94a161 100644 --- a/irc/ircd-hybrid/files/ircd-hybrid.sh +++ b/irc/ircd-hybrid/files/ircd-hybrid.sh @@ -1,14 +1,19 @@ #!/bin/sh +PIDFILE=/var/run/ircd.pid + if [ $# -eq 0 -o x$1 = xstart ]; then if [ -x %PREFIX%/bin/ircd ]; then + touch $PIDFILE + chown ircd $PIDFILE su -fm ircd -c %PREFIX%/bin/ircd && echo ' ircd' fi fi if [ x$1 = xstop ]; then - if [ -f %PREFIX%/etc/ircd.pid ]; then - kill `cat %PREFIX%/etc/ircd.pid` + if [ -s $PIDFILE ]; then + kill `cat $PIDFILE` else # oh well killall ircd fi + rm -f $PIDFILE fi |