Skip to Content.
Sympa Menu

en - Re: Re: [sympa-users] Sympa and SuSE

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: address@concealed
  • To: address@concealed
  • Subject: Re: Re: [sympa-users] Sympa and SuSE
  • Date: Sat, 5 Jun 2004 19:36:30 +0200

Hi,

I'm no expert, however by modifying the original script that comes with the
debian package, I got this to work. Note that you may need to change the
first few varuables if you are not using the default configuration.

The script should be place in /etc/init.d/ and the whole /home/sympa needs to
be owned by the user sympa is running as. So, for default configuration first
do: "chown -R sympa:sympa /home/sympa".

You might want to put the script in "Shared Web". Any
improvements/corrections is welcome.

NOTE: This is for Debian. If I had time, I'll create a similar one for SuSE.

Regards,
Saman

Script:
-=-=-=-
#! /bin/sh

PATH=/bin:/usr/bin:/sbin:/usr/sbin

DAEMON=/home/sympa/bin/sympa.pl
PIDFILE=/home/sympa/sympa.pid

ARCHIVED_DAEMON=/home/sympa/bin/archived.pl
ARCHIVED_PIDFILE=/home/sympa/archived.pid

BOUNCED_DAEMON=/home/sympa/bin/bounced.pl
BOUNCED_PIDFILE=/home/sympa/bounced.pid

TASK_MANAGER_DAEMON=/home/sympa/bin/task_manager.pl
TASK_MANAGER_PIDFILE=/home/sympa/task_manager.pid

OWNER="sympa:sympa"

use_db()
{
conf=/etc/sympa.conf

grep -q "^[[:space:]]*db_name" $conf &&\
grep -q "^[[:space:]]*db_type" $conf &&\
return 0

return 1
}

test -f $DAEMON || exit 0
test -f $ARCHIVED_DAEMON || exit 0
test -f $BOUNCED_DAEMON || exit 0
test -f $TASK_MANAGER_DAEMON || exit 0

case "$1" in
start)
echo -n "Starting mailing list manager:"
echo -n " sympa"
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--chuid $OWNER --exec $DAEMON
start-stop-daemon --start --quiet --pidfile $ARCHIVED_PIDFILE \
--chuid $OWNER --exec $ARCHIVED_DAEMON
start-stop-daemon --start --quiet --pidfile $TASK_MANAGER_PIDFILE \
--chuid $OWNER --exec $TASK_MANAGER_DAEMON

if use_db ; then
start-stop-daemon --start --quiet --pidfile $BOUNCED_PIDFILE \
--chuid $OWNER --exec $BOUNCED_DAEMON
fi

echo "."
;;
stop)
echo -n "Stopping mailing list manager:"
echo -n " sympa"

if use_db ; then
start-stop-daemon --stop --quiet --pidfile $BOUNCED_PIDFILE
fi

start-stop-daemon --stop --quiet --pidfile $TASK_MANAGER_PIDFILE
start-stop-daemon --stop --quiet --pidfile $ARCHIVED_PIDFILE
start-stop-daemon --stop --quiet --pidfile $PIDFILE
echo "."
;;
restart|force-reload|reload)
$0 stop
sleep 3
$0 start
;;
*)
echo "Usage: /etc/init.d/sympa {start|stop|restart|reload|force-reload}"
exit 1
;;
esac

exit 0



Archive powered by MHonArc 2.6.19+.

Top of Page