2019-09-20 - hschneider, Admin
Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.
Printable Version of Topic
Click here to view this topic in its original format |
XMail Forum > XMail Queue Manager > Daemon Startup Script |
Posted by: hschneider Mar 2 2004, 09:11 AM | ||
Just adapt the Agent's path and go .. |
Posted by: Sougent Jul 8 2004, 02:19 AM |
Hi, I need the idiots guide to setting up startup scripts, I've created a copy of this XQM startup script but I can't get it to work. Could someone give me step by step instructions for where to put this script and how to set it up so that it will run automatically when I boot up at run level 3? If you haven't guessed, I'm new at this Linux thing and though I kinda understand the whole thing, I guess I'm missing a piece because for the life of me I can't get this to work. Thanks, |
Posted by: hschneider Jul 8 2004, 06:11 AM |
In most distributions, this file (name it xqmagent) needs to go to /etc/rc.d/init.d cd /etc/rc.d/init.d chmod 755 xqmagent cd /etc/rc.d/rc3.d ln -s /etc/rc.d/init.d/xqmagent S91xqmagent Then reboot. This creates a symbolic link in your runlevel folder, which points to the script. The S91 prefix tells your system to start the agent right after XMail, which typically has S90 as prefix. The magic here is, that all filenames inside the runlevel folder are executed in alphabetical order. |
Posted by: Sougent Jul 8 2004, 07:03 AM | ||
Hi, That worked, to a point, but it failed with a "no such file or directory" when it tried to come up on the reboot. My xqmagent directory is /var/xqmagent, the AGENT_ROOT looks correct. Otherwise the script is exactly as posted here. Any ideas? Joe |
Posted by: hschneider Jul 8 2004, 07:58 AM |
cd /etc/rc.d/init.d ./xqmagent start Any messages after this ? Which OS and distribution do you use ? |
Posted by: Sougent Jul 10 2004, 10:17 PM | ||
: bad interpreter: No such file or directoory Fedora Core release 1 (Yarrow) Kernel 2.4.22-1.2194.nptl |
Posted by: hschneider Jul 10 2004, 11:20 PM |
This can mean several things. In fact the script cannot be executed. Make sure that - the 1st line of the script starts with #! and is not blank, - that sh exists in your /bin folder and - you don't use non-Unix lineendings in the case you've edited the script on Windows. |
Posted by: Sougent Jul 11 2004, 02:29 AM | ||
Non-Unix line endings it was........ Everything works now except that when I run it from the command line it takes a good minute from the point it says Daemonized before it gives me back the command line. Takes a long while when booting up too, but finally makes it through. Thanks for your help. |
Posted by: hschneider Jul 11 2004, 08:53 AM |
This delay can be supressed in the next version. It starts scanning the queue on teh very first startup, which can take some time depending on your hardware. |
Posted by: dbatch Apr 11 2005, 05:40 PM |
RedHat Fedora requires The following two lines in the startup scripts chkconfig and description These are some example lines from my xmail rc script, it should be the same for xqm #!/bin/sh # # chkconfig: 2345 80 30 # description: Xmail server # # |
Posted by: hschneider Apr 11 2005, 07:43 PM |
Thanks! |