Commit 1565f234 authored by aumont's avatar aumont
Browse files

Bug fix: SysV script did not work

Now use 'PIDDIR' var to locate .pid file


git-svn-id: https://subversion.renater.fr/sympa/trunk@957 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 8cf6d7e1
......@@ -285,7 +285,7 @@ installscript:
$(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \
DIR='${DIR}' DESTDIR='${DESTDIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' WWSBINDIR='${WWSBINDIR}' HOST='${HOST}' \
CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' ETCBINDIR='${ETCBINDIR}' \
MAILERPROGDIR='${MAILERPROGDIR}' \
MAILERPROGDIR='${MAILERPROGDIR}' PIDDIR='${PIDDIR}' \
COOKIE='${COOKIE}' INITDIR='${INITDIR}' \
PIDPRE='${PIDPRE}' PIDPOST='${PIDPOST}' LOCKDIR='${LOCKDIR}' \
OPENSSL='@OPENSSL@' USER='${USER}' GROUP='${GROUP}' ICONSDIR='${ICONSDIR}' install) || exit 1;
......
......@@ -81,6 +81,7 @@ installinit:
DESTDIR=$(DESTDIR); export DESTDIR; \
INSTALLDIR=$(INITDIR); export INSTALLDIR; \
BINDIR=$(BINDIR); export BINDIR; \
PIDDIR=$(PIDDIR); export PIDDIR; \
ETCBINDIR=$(ETCBINDIR); export ETCBINDIR; \
CONFIG=$(CONFIG); export CONFIG; \
WWSCONFIG=$(WWSCONFIG); export WWSCONFIG; \
......
......@@ -47,9 +47,9 @@ sympa_status() {
return 0
fi
# Next try "/var/run/*.pid" files
if [ -f /var/run/$1.pl.pid ] ; then
pid=`head -1 /var/run/$1.pl.pid`
# Next try "--PIDDIR--/*.pid" files
if [ -f --PIDDIR--/$1.pid ] ; then
pid=`head -1 --PIDDIR--/$1.pid`
if [ "$pid" != "" ] ; then
echo "$1 died, pid file remains."
return 1
......@@ -76,7 +76,7 @@ sympa_module_start() {
sleep 1
pid=`--PIDPRE-- $sympadir/$1.pl --PIDPOST--`
if [ $pid ]; then
echo $pid > /var/run/$1.pl.pid
echo $pid > --PIDDIR--/$1.pid
fi
echo
}
......@@ -112,11 +112,11 @@ sympa_stop() {
return 1
fi
if [ -f /var/run/$1.pl.pid ]; then
if [ -f --PIDDIR--/$1.pid ]; then
echo -n "Stopping module $1.pl: "
killproc $1.pl
# kill `--PIDPRE-- $1.pl --PIDPOST--`
rm -f /var/run/$1.pl.pid
rm -f --PIDDIR--/$1.pid
echo
fi
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment