Commit b0ce6351 authored by sikeda's avatar sikeda
Browse files

[change] sympa.pl was splitted to three programs: sympa.pl command-line...

[change] sympa.pl was splitted to three programs: sympa.pl command-line utility, sympa_msg.pl daemon and sympa_automatic.pl daemon.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@11912 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 507c5ecd
......@@ -86,14 +86,16 @@ case "$1" in
if [ ! -f $pidfilepath/sympa ]; then
echo "Starting Sympa subsystem: "
echo ' *** sympa.pl...'
$sympadir/sympa.pl
echo ' *** sympa_msg.pl...'
$sympadir/sympa_msg.pl
echo ' *** bulk.pl...'
$sympadir/bulk.pl
echo ' *** archived.pl...'
$sympadir/archived.pl
echo ' *** bounced.pl...'
$sympadir/task_manager.pl
echo ' *** task_manager.pl...'
$sympadir/bounced.pl
echo ' *** task_manager.pl...'
$sympadir/task_manager.pl
touch $pidfilepath/sympa
sleep $start_wait
else
......@@ -105,9 +107,20 @@ case "$1" in
stop)
echo "Stopping Sympa subsystem: "
if [ -f $pidfilepath/sympa ]; then
kill `cat $pidfilepath/sympa.pid`
kill `cat $pidfilepath/sympa-creation.pid`
kill `cat $pidfilepath/sympa-distribute.pid`
kill `cat $pidfilepath/sympa_msg.pid`
if [ -f $pidfilepath/sympa.pid ]; then
kill `cat $pidfilepath/sympa.pid`
fi
if [ -f $pidfilepath/sympa-creation.pid ]; then
kill `cat $pidfilepath/sympa-creation.pid`
fi
if [ -f $pidfilepath/sympa-distribute.pid ]; then
kill `cat $pidfilepath/sympa-distribute.pid`
fi
if [ -f $pidfilepath/sympa_automatic.pid ]; then
kill `cat $pidfilepath/sympa_automatic.pid`
fi
kill `cat $pidfilepath/bulk.pid`
kill `cat $pidfilepath/archived.pid`
kill `cat $pidfilepath/bounced.pid`
kill `cat $pidfilepath/task_manager.pid`
......@@ -130,9 +143,11 @@ case "$1" in
verify_up)
some_are_down=0
echo "Verifying Sympa is UP:"
check_up sympa || some_are_down=1
check_up sympa_msg || some_are_down=1
check_up bounced || some_are_down=1
check_up bulk || some_are_down=1
check_up archived || some_are_down=1
check_up task_manager || some_are_down=1
if [ $some_are_down -eq 0 ]; then
echo " All fine."
exit 0
......@@ -144,9 +159,11 @@ case "$1" in
verify_down)
some_are_up=0
echo "Verifying Sympa is DOWN:"
check_down sympa || some_are_up=1
check_down sympa_msg || some_are_up=1
check_down bounced || some_are_up=1
check_down bulk || some_are_up=1
check_down archived || some_are_up=1
check_down task_manager || some_are_up=1
if [ $some_are_up -eq 0 ]; then
echo " All is down."
exit 0
......
......@@ -249,7 +249,7 @@ case "$1" in
if [ ! -f ${sympalockdir}/sympa ]; then
echo "Starting Sympa subsystem: "
sympa_check || exit 1
sympa_start sympa
sympa_start sympa_msg
sympa_start bulk
sympa_start archived
sympa_start bounced
......@@ -268,14 +268,22 @@ case "$1" in
sympa_stop bounced
sympa_stop archived
sympa_stop bulk
sympa_stop sympa
sympa_stop sympa_msg
if [ -f ${sympapiddir}/sympa.pid ]; then
# For Sympa earlier than 6.2b.4
sympa_stop sympa
fi
if [ -f ${sympapiddir}/sympa-distribute.pid ]; then
# For Sympa earlier than 6.2.
# For Sympa earlier than 6.2b.1
sympa_stop sympa-distribute
fi
if [ -f ${sympapiddir}/sympa-creation.pid ]; then
# For Sympa earlier than 6.2b.4
sympa_stop sympa-creation
fi
if [ -f ${sympapiddir}/sympa_automatic.pid ]; then
sympa_stop sympa_automatic
fi
sympa_stop task_manager
if [ -f ${sympalockdir}/sympa ]; then
rm -f ${sympalockdir}/sympa
......@@ -288,7 +296,7 @@ case "$1" in
else
echo "Status file for subsystem NOT found."
fi
sympa_status sympa
sympa_status sympa_msg
sympa_status bulk
sympa_status archived
sympa_status bounced
......
......@@ -366,7 +366,6 @@ See L<http://www.sympa.org/tracking>.
=head1 SEE ALSO
L<sympa(8)>, L<sendmail(8)>.
L<sympa(1)>, L<sympa_msg(8)>, L<sendmail(8)>, L<wwsympa(8)>.
=cut
......@@ -24,18 +24,22 @@ sbin_SCRIPTS = archived.pl \
bounced.pl \
bulk.pl \
sympa.pl \
sympa_automatic.pl \
sympa_msg.pl \
sympa_newaliases.pl \
sympa_wizard.pl \
task_manager.pl
man1_MANS = \
sympa.1 \
sympa_newaliases.1 \
sympa_wizard.1
man8_MANS = \
archived.8 \
bounced.8 \
bulk.8 \
sympa.8 \
sympa_automatic.8 \
sympa_msg.8 \
task_manager.8
EXTRA_DIST = \
......@@ -43,13 +47,15 @@ EXTRA_DIST = \
bounced.pl.in \
bulk.pl.in \
sympa.pl.in \
sympa_automatic.pl.in \
sympa_msg.pl.in \
sympa_newaliases.pl.in \
sympa_wizard.pl.in \
task_manager.pl.in
CLEANFILES = $(sbin_SCRIPTS) $(man1_MANS) $(man8_MANS)
archived.pl bounced.pl bulk.pl sympa.pl task_manager.pl: Makefile
archived.pl bounced.pl bulk.pl sympa.pl sympa_automatic.pl sympa_msg.pl task_manager.pl: Makefile
rm -f $@
$(AM_V_GEN)$(SED) \
-e 's|--PERL--|$(PERL)|' \
......@@ -59,6 +65,7 @@ archived.pl bounced.pl bulk.pl sympa.pl task_manager.pl: Makefile
-e 's|--localedir--|$(localedir)|' \
-e 's|--modulesdir--|$(modulesdir)|' \
-e 's|--piddir--|$(piddir)|' \
-e 's|--sbindir--|$(sbindir)|' \
-e 's|--spooldir--|$(spooldir)|' \
-e 's|--CONFIG--|$(CONFIG)|' \
< $(srcdir)/$@.in > $@
......@@ -68,6 +75,8 @@ archived.pl: $(srcdir)/archived.pl.in
bounced.pl: $(srcdir)/bounced.pl.in
bulk.pl: $(srcdir)/bulk.pl.in
sympa.pl: $(srcdir)/sympa.pl.in
sympa_automatic.pl: $(srcdir)/sympa_automatic.pl.in
sympa_msg.pl: $(srcdir)/sympa_msg.pl.in
task_manager.pl: $(srcdir)/task_manager.pl.in
sympa_newaliases.pl sympa_wizard.pl: Makefile
......@@ -104,3 +113,7 @@ sympa_wizard.pl: $(srcdir)/sympa_wizard.pl.in
$(AM_V_GEN)$(POD2MAN) --section=8 --center="sympa $(VERSION)" \
--lax --release="$(VERSION)" $*.pl $@
# Remove old sympa.8 manpage.
install-data-hook:
rm -f $(DESTDIR)$(man8dir)/sympa.8
......@@ -1223,6 +1223,6 @@ See L<http://www.sympa.org/tracking>.
=head1 SEE ALSO
L<sympa(8)>, L<bounced(8)>, L<mhonarc(1)>, L<sympa.conf(5)>.
L<sympa_msg(8)>, L<bounced(8)>, L<mhonarc(1)>, L<sympa.conf(5)>.
=cut
......@@ -2249,6 +2249,6 @@ See L<http://www.sympa.org/tracking>.
=head1 SEE ALSO
L<sympa(8)>, L<wwsympa(8)>, L<mhonarc(1)>, L<sympa.conf(5)>.
L<sympa_msg(8)>, L<wwsympa(8)>, L<mhonarc(1)>, L<sympa.conf(5)>.
=cut
......@@ -685,6 +685,6 @@ See L<http://www.sympa.org/tracking>.
=head1 SEE ALSO
L<sympa(8)>, L<sendmail(8)>
L<sympa_msg(8)>, L<sendmail(8)>
=cut
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1490,8 +1490,9 @@ sub purge_orphan_bounces {
# Finally removing orphan files
my $marshalled;
while ($marshalled = readdir $dh) {
my $metadata = tools::unmarshal_metadata($bounce_dir,
$marshalled, qr/\A([^\s\@]+\@[\w\.\-*]+?)(?:_(\w+))?\z/,
my $metadata =
tools::unmarshal_metadata($bounce_dir, $marshalled,
qr/\A([^\s\@]+\@[\w\.\-*]+?)(?:_(\w+))?\z/,
[qw(recipient envid)]);
next unless $metadata;
# Skip <email>_<envid> which is used by tracking feature.
......@@ -2016,7 +2017,7 @@ See L<http://www.sympa.org/tracking>.
=head1 SEE ALSO
L<sympa(8)>, L<wwsympa(8)>
L<sympa_msg(8)>, L<wwsympa(8)>
=cut
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