]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Ready to do test on mailpostg
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Thu, 17 Jul 2025 19:52:33 +0000 (15:52 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Thu, 17 Jul 2025 19:52:33 +0000 (15:52 -0400)
linux/osukiss/mailleur
linux/osukiss/receiver
linux/osukiss/scanner
linux/osukiss/sender [new file with mode: 0644]
linux/osukiss/sorter
mailleur.spec.in

index a03ee7147b057557e31d8010f8863014615bea19..a6298abcf82ee8e240fe2dd364ebea9e82da3595 100644 (file)
@@ -42,6 +42,7 @@ case "$1" in
     )
        /usr/share/$APPNAME/linux/osukiss/receiver $1
        /usr/share/$APPNAME/linux/osukiss/scanner $1
+       /usr/share/$APPNAME/linux/osukiss/sender $1
        /usr/share/$APPNAME/linux/osukiss/sorter $1
         ;;
 
index 9c958cc29edc13684b2c0f204aa00cb2ed0f07ae..656e9cff04341c9a8dfe8b2599d1625edda0effd 100644 (file)
@@ -48,13 +48,13 @@ case "$1" in
       exit 1;
       fi
     log_info_msg "Starting ${DAEMON} Server..."
-    start_daemon -f /usr/sbin/${DAEMON} $OPTIONS
+    start_daemon -f /usr/libexec/$APNAME/${DAEMON} $OPTIONS
     evaluate_retval
     ;;
 
   stop)
     log_info_msg "Stopping ${DAEMON} Server..."
-    killproc -p ${DAEMON_PID} /usr/sbin/${DAEMON}
+    killproc -p ${DAEMON_PID} /usr/libexec/$APNAME/${DAEMON}
     evaluate_retval
     rm -fr ${DAEMON_PID}
     ;;
index bee4eade66bc1c47e20fcf0396f0b8bf36e8db61..1c31539b1f0e7f1127efa1a33980ac360871e22c 100644 (file)
@@ -48,13 +48,13 @@ case "$1" in
       exit 1;
       fi
     log_info_msg "Starting ${DAEMON} Server..."
-    start_daemon -f /usr/sbin/${DAEMON} $OPTIONS
+    start_daemon -f /usr/libexec/$APNAME/${DAEMON} $OPTIONS
     evaluate_retval
     ;;
 
   stop)
     log_info_msg "Stopping ${DAEMON} Server..."
-    killproc -p ${DAEMON_PID} /usr/sbin/${DAEMON}
+    killproc -p ${DAEMON_PID} /usr/libexec/$APNAME/${DAEMON}
     evaluate_retval
     rm -fr ${DAEMON_PID}
     ;;
diff --git a/linux/osukiss/sender b/linux/osukiss/sender
new file mode 100644 (file)
index 0000000..7936d64
--- /dev/null
@@ -0,0 +1,105 @@
+#!/bin/sh
+#=================================================================
+# Begin receiver
+#
+# Description : Start mailleur sender daemon
+# chkconfig: 2345 94 12
+#
+#=================================================================
+
+### BEGIN INIT INFO
+# Provides:            $sender
+# Should-Start:
+# Required-Stop:       sendsignals
+# Should-Stop:
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts sender daemon.
+# Description:         Starts sender daemon.
+# X-LFS-Provided-By:   LFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+APPNAME=mailleur
+DAEMON=sender
+DAEMON_PID=/run/${APPNAME}/${DAEMON}.lock
+
+# Some functions to make the below more readable
+
+#loading load configuration file
+if [ -f  /etc/sysconfig/$APPNAME ] ; then
+  . /etc/sysconfig/$APPNAME
+fi
+
+#--------------------------------------------------------------
+#to start receiver daemon
+#--------------------------------------------------------------
+mng_daemon ()
+
+{
+case "$1" in
+  start)
+    mkdir -p /run/$APPNAME/
+    chown $APPNAME:mail /run/$APPNAME/
+    /usr/lib/$APPNAME/support/starting.sh osukiss
+    if [ $? != 0 ] ; then
+      exit 1;
+      fi
+    log_info_msg "Starting ${DAEMON} Server..."
+    start_daemon -f /usr/libexec/$APPNAME/${DAEMON} $OPTIONS
+    evaluate_retval
+    ;;
+
+  stop)
+    log_info_msg "Stopping ${DAEMON} Server..."
+    killproc -p ${DAEMON_PID} /usr/libexec/$APNAME/${DAEMON}
+    evaluate_retval
+    rm -fr ${DAEMON_PID}
+    ;;
+
+ esac
+}
+
+case "$1" in
+      start    \
+    | stop     \
+    )
+       mng_daemon $1
+        ;;
+
+    reload)
+        log_info_msg "Reloading ${DAEMON} Server..."
+        pid=`cat ${DAEMON_PID} 2>/dev/null`
+
+        if [ -n "${pid}" ]; then
+           kill -HUP "${pid}"
+        else
+           (exit 1)
+        fi
+
+        evaluate_retval
+        ;;
+
+    restart)
+        $0 stop
+        sleep 1
+        $0 start
+        ;;
+
+    condrestart)
+        pid=`cat ${DAEMON_PID} 2>/dev/null`
+        if [ -n "${pid}"  -a -d /proc/$pid ]; then
+         $0 restart
+         fi
+        ;;
+
+
+    *)
+        echo "Usage: $0 {start|stop|reload|restart}"
+        exit 1
+        ;;
+esac
+
+
+
index 122b1f50476e67db32f3733f08f8c3432b87d497..0ad63d2a03174b93099bcb0c7f47caf2818a42e8 100644 (file)
@@ -48,13 +48,13 @@ case "$1" in
       exit 1;
       fi
     log_info_msg "Starting ${DAEMON} Server..."
-    start_daemon -f /usr/sbin/${DAEMON} $OPTIONS
+    start_daemon -f /usr/libexec/$APNAME/${DAEMON} $OPTIONS
     evaluate_retval
     ;;
 
   stop)
     log_info_msg "Stopping ${DAEMON} Server..."
-    killproc -p ${DAEMON_PID} /usr/sbin/${DAEMON}
+    killproc -p ${DAEMON_PID} /usr/libexec/$APNAME/${DAEMON}
     evaluate_retval
     rm -fr ${DAEMON_PID}
     ;;
index 467316be981f8d6f852c961c22ba5e6a34c5aea9..37a36c66802f6d1a7e5a03620c91284711a2e1f7 100644 (file)
@@ -37,6 +37,7 @@ search about email exchange within time and transaction context.
 %attr(0754,root,root) %{_datadir}/%{name}/linux/osukiss/%{name}
 %attr(0754,root,root) %{_datadir}/%{name}/linux/osukiss/receiver
 %attr(0754,root,root) %{_datadir}/%{name}/linux/osukiss/scanner
+%attr(0754,root,root) %{_datadir}/%{name}/linux/osukiss/sender
 %attr(0754,root,root) %{_datadir}/%{name}/linux/osukiss/sorter
 %attr(0644,%{name},mail) %config(noreplace) %{_sysconfdir}/pki/%{name}/*
 %attr(0644,%{name},mail) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
@@ -69,7 +70,7 @@ if [ "$1" = 0 ]; then
   case "$OS" in
     "sysv"     |                               \
     "osukiss"  )
-      for action in %{name} receiver sorter
+      for action in %{name} receiver scanner sender sorter 
        do
         %{_initrddir}/${action} stop > /dev/null 2>&1 || :
         %{_sbindir}/chkconfig --del ${action} 
@@ -120,7 +121,7 @@ if [ "$1" = 1 ]; then
   case "$OS" in
     "sysv"     |                                       \
     "osukiss"  )
-      for action in %{name} receiver sorter
+      for action in %{name} receiver scanner sender sorter 
        do
         %{__ln_s}                                      \
                %{_datadir}/%{name}/linux/$OS/${action} \