XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum [Powered by Invision Power Board]
Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > XMail Queue Manager > xqmagent / Linux - Some questions


Posted by: NomadCF Feb 5 2004, 07:43 AM
Is there a way to stop xqmagent with out having to kill -9 it's proc # ?

Is there a way to redirect where it looks for the xqmagent.conf file ?

Posted by: hschneider Feb 5 2004, 07:54 AM
>Is there a way to stop xqmagent with out having to kill -9 it's proc # ?
Not at the moment. Since the Python runtime environment does not prevent the child process PID, it's hard to implement. But I'm working on it. One of the next updates will fullfill the daemon standards start, stop, restart completely.

>Is there a way to redirect where it looks for the xqmagent.conf file ?
No, but this will also go into one of the next updates. So root access to /etc won't be necessary anymore.


Posted by: atomant Feb 5 2004, 02:19 PM
The easy way to stop xqmagent:
#killall xqmagent

Plain and simple. image007.gif

Posted by: hschneider Feb 5 2004, 03:15 PM
Yep -- but it can happen that the port stays occupied ... so the Agent needs to handle the KILL signal, freeying the port before going down.

Posted by: hschneider Feb 5 2004, 06:29 PM
As an intermediate solution, take this startup script (don't foget to fill in your Agent's location):

CODE

#!/bin/sh
#
# skeleton example file to build /etc/init.d/ scripts.
#  This file should be used to construct scripts for /etc/init.d.
#
#  Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#  Modified by Harald Schneider <h_schneider@marketmix.com>
#
# Version: @(#)skeleton  1.8  03-Mar-1998  miquels@cistron.nl
#

# __Start_of_configuration__
#
# Place the path to your Agent's folder here:
#

AGENT_ROOT=/var/xqmagent

#
# __End_of_configuration__

LD_ASSUME_KERNEL="2.4.1"

PATH=$AGENT_ROOT:/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=$AGENT_ROOT/xqmagent
NAME=xqmagent
DESC="XQM Agent"

test -f $DAEMON || exit 0

set -e
ulimit -c 20000

start_agent()
{
 $DAEMON
}

stop_agent()
{
 killall -KILL $NAME
}

debug_agent()
{
 $DAEMON --debug
}


case "$1" in
 start)
     echo -n "Starting $DESC: "
     start_agent
;;
 stop)
     echo -n "Stopping $DESC: "
     stop_agent
     echo "Stopped!"
;;
 debug)
     echo "Debugging $DESC ... "
     debug_agent
;;
 restart|force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart".
#
echo -n "Restarting $DESC ... "
stop_agent
sleep 1
start_agent
;;
 *)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload|debug}" >&2
exit 1
;;
esac

exit 0


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)