Skip to Content.
Sympa Menu

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

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaun - CRU <address@concealed>
  • To: address@concealed
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Sympa and SuSE
  • Date: Thu, 17 Jun 2004 09:34:40 +0200

Hi Saman,

Comment on the script : the use_db() test is not required since recent versions of Sympa require a database.
Maybe we should try merging this script with the one that is distributed with Sympa...

address@concealed wrote:

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.

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



--
Olivier Salaün
Comité Réseau des Universités
-------------------------------------------
Validation signature / Trusting signature: --> http://igc.cru.fr/trust.html
-------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.19+.

Top of Page