1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Move .pid file to /var/run

PR:		ports/83089
Submitted by:	Radim Kolar <hsn@netmag.cz>
Approved by:	maintainer timeout (14 days)
This commit is contained in:
Pav Lucistnik 2005-07-21 15:07:44 +00:00
parent 68e30f11e9
commit d904771c3a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=139823
3 changed files with 20 additions and 6 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= ircd-hybrid
PORTVERSION= 7.0.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= irc ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ircd-hybrid

View File

@ -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 */

View File

@ -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