Accéder au contenu.
Menu Sympa

fr - Re: [sympa-fr] Installation de sympa v 3.4.3.1

Objet : Pour les administrateurs de serveurs de listes utilisant le logiciel Sympa

Archives de la liste

Chronologique Discussions  
  • From: Michel GAUDET <adresse@cachée>
  • To: <adresse@cachée>
  • Cc: <adresse@cachée>
  • Subject: Re: [sympa-fr] Installation de sympa v 3.4.3.1
  • Date: Tue, 22 Apr 2003 10:52:38 +0200 (CEST)

Bonjour !


:: Le 22 April 2003, adresse@cachée a écrit :

**Bonjour,
**
**Je cherche à installer SYMPA sur une SUSE v 8.1.
**
**Le 'configure', le 'make' et le 'make install' se déroule bien...
**
**Le script de démarrage est copié dans /etc/init.d/init.d. Cela ne semble
pas trés correct, et il vaudrait mieux, amha, /etc/init.d. Bref, ce n'est pas
bien méchant.
**
**J'active ce sript et là commencent les ennuis :
**
**"./sympa: line 19: /etc/rc.d/init.d/functions: No such file or directory"
**
**J'ai regardé brièvement le script et l'erreur se produit suite à un test
sur la variable $OSTYPE ... (en regardant plus loin dans le script des tests
sur $OSTYPE reviennent 6 fois). Sur mon système $OSTYPE renvoie 'linux'.
**
**J'ai regardé dans les archives et dans la documentation mais je n'ai rien
trouvé.
**
**Ayant assez de temps devant moi, je m'adresse à vous.
**
**Quelqu'un a-t-il eu le même genre de souci ou connait-il un début de
solution ?
**
**D'avance merci...
**
**François OTHO
**

J'ai un sympa 3.4.2 qui tourne sur une SuSE 8.1 et j'ai adapté le script
de démarrage à la SuSE.
Il est joint à ce mail.

IL faut modifier à la main la variable 'locale' :
SYMPA_DIR=....

l'installer dans /etc/init.d

et si vous voulez utiliser le 'LSB compatible service control script' il
faudra adapter les services requis dans la ligne :
si vous n'utilisez pas sendmail et/ou mysql et/ou apache.
# Required-Start: $syslog $remote_fs $network sendmail mysql apache

Enfin il suffira de lancer : insserv /etc/init.d/sympa
pour que les liens qui vont biens soient créés dans les
différents /etc/init.d/rcX.d


Cordialement.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

^ ^ ---- Michel GAUDET +--- | | +--- +--- +---
/| /|| | Service Informatique Recherche |__ |__| |__ |__ |__
/ |/ || __ Ecole des Hautes Etudes | | | | | |
/ ||____| en Sciences Sociales +--- | | +--- ---+ ---+
54 Boulevard RASPAIL 75006 PARIS
Tel:(33) 01 49 54 25 91 Email: adresse@cachée
FAX:(33) 01 49 54 26 85
#! /bin/sh
# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Kurt Garloff <adresse@cachée>
# Auteur version sympa: Michel Gaudet adresse@cachée
#
# /etc/init.d/sympa
# and its symbolic link
# /(usr/)sbin/rcsympa
#
# Template system startup script for some example service/daemon FOO
#
# LSB compatible service control script; see http://www.linuxbase.org/spec/
#
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
# UnitedLinux (UL) based Linux distributions. If you want to base your
# script on this template and ensure that it works on non UL based LSB
# compliant Linux distributions, you either have to provide the rc.status
# functions from UL or change the script to work without them.
#
### BEGIN INIT INFO
# Provides: sympa
# Required-Start: $syslog $remote_fs $network sendmail mysql apache
# X-UnitedLinux-Should-Start: $time
# Required-Stop: $syslog $remote_fs
# X-UnitedLinux-Should-Stop: $time ypbind sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: sympa gestion liste distribution
# Description: Démarrer sympa qui gère les listes de distribution de
mail
### END INIT INFO
#
# Any extensions to the keywords given above should be preceeded by
# X-VendorTag- (X-UnitedLinux- for us) according to LSB.
#
# Notes on Required-Start/X-UnitedLinux-Should-Start:
# * There are two different issues that are solved by Required-Start
# and X-UnitedLinux-Should-Start
# (a) Hard dependencies: This is used by the runlevel editor to determine
# which services absolutely need to be started to make the start of
# this service make sense. Example: nfsserver should have
# Required-Start: portmap
# Also, required services are started before the dependent ones.
# The runlevel editor will warn about such missing hard dependencies
# and suggest enabling. During system startup, you may expect an error,
# if the dependency is not fulfilled.
# (b) Specifying the init script ordering, not real (hard) dependencies.
# This is needed by insserv to determine which service should be
# started first (and at a later stage what services can be started
# in parallel). The tag X-UnitedLinux-Should-Start: is used for this.
# It tells, that if a service is available, it should be started
# before. If not, never mind.
# * When specifying hard dependencies or ordering requirements, you can
# use names of services (contents of their Provides: section)
# or pseudo names starting with a $. The following ones are available
# according to LSB (1.1):
# $local_fs all local file systems are mounted
# (most services should need this!)
# $remote_fs all remote file systems are mounted
# (note that /usr may be remote, so
# many services should Require this!)
# $syslog system logging facility up
# $network low level networking (eth card, ...)
# $named hostname resolution available
# $netdaemons all network daemons are running
# The $netdaemons pseudo service has been removed in LSB 1.2.
# For now, we still offer it for backward compatibility.
# These are new (LSB 1.2):
# $time the system time has been set correctly
# $portmap SunRPC portmapping service available
# UnitedLinux extensions:
# $ALL indicates that a script should be inserted
# at the end
# * The services specified in the stop tags
# (Required-Stop/X-UnitedLinux-Should-Stop)
# specify which services need to be still running when this service
# is shut down. Often the entries there are just copies or a subset
# from the respective start tag.
#
# Note on runlevels:
# 0 - halt/poweroff 6 - reboot
# 1 - single user 2 - multiuser without network exported
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
#
# Note on script names:
# http://www.linuxbase.org/spec/refspecs/LSB_1.2.0/gLSB/scrptnames.html
# A registry has been set up to manage the init script namespace.
# http://www.lanana.org/
# Please use the names already registered or register one or use a
# vendor prefix.


# Check for missing binaries (stale symlinks should not happen)
SYMPA_DIR=/home/sympa/bin
test -d $SYMPA_DIR || exit 5

# Check for existence of needed config file and read it
SYMPA_CONFIG=/etc/sympa.conf
WWSYMPA_CONFIG=/etc/wwsympa.conf
test -r $SYMPA_CONFIG -a -r $WWSYMPA_CONFIG || exit 6

# Source LSB init functions
# providing start_daemon, killproc, pidofproc,
# log_success_msg, log_failure_msg and log_warning_msg.
# This is currently not used by UnitedLinux based distributions and
# not needed for init scripts for UnitedLinux only. If it is used,
# the functions from rc.status should not be sourced or used.
#. /lib/lsb/init-functions

# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
# rc_splash arg sets the boot splash screen to arg (if active)
. /etc/rc.status

# Reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.

sympa_status() {
# Test syntax.
if [ $# = 0 ] ; then
echo "Usage: sympa_status {program}"
return 1
fi
checkproc $1.pl
case "$?" in
3)
echo " Module $1 ne tourne pas."
;;
1)
echo " Etat du module $1 inconnu."

;;
0)
echo " Module $1 est actif"
;;
esac
}
# Start a module
sympa_module_start() {
if [ $# = 0 ] ; then
echo "Usage: sympa_module_start {program}"
return 1
fi
$SYMPA_DIR/$1.pl && echo "succès" || echo "Echec"
}

# Test state of module before startup
sympa_start() {
if [ $# = 0 ] ; then
echo "Usage: sympa_start {program}"
return 1
fi
checkproc $1.pl
case "$?" in
3)
echo -n " Démarrage module $1.pl : "
sympa_module_start $1
;;
1)
echo -n " Redémarrage $1"
sympa_module_start $1
;;
0)
echo " $1 est déjà actif."
;;
esac
}
sympa_stop() {
if [ $# = 0 ] ; then
echo "Usage: sympa_stop {program}"
return 1
fi
killproc $SYMPA_DIR/$1.pl
case $? in
0) echo " Arret $1" ;;
7) echo " $1 ne tournait pas" ;;
*) echo " Statut inconnu" ;;
esac
}
case "$1" in
start)
echo "Démarrage sympa :"
sympa_start sympa
sympa_start archived
sympa_start bounced
sympa_start task_manager

# Remember status and be verbose
rc_status -v
;;
stop)
echo "Arret sympa"
sympa_stop task_manager
sympa_stop archived
sympa_stop bounced
sympa_stop sympa

# Remember status and be verbose
rc_status -v
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start

# Remember status and be quiet
rc_status
;;
status)
echo "Vérification sympa :"
sympa_status sympa
sympa_status archived
sympa_status bounced
sympa_status task_manager
;;
*)
echo "Usage: $0
{start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit



Archives gérées par MHonArc 2.6.19+.

Haut de le page