Date: 2004-07-12T13:04:54
   Editor: 196.32.47.6 <>
   Wiki: Apache James Wiki
   Page: RunAsService
   URL: http://wiki.apache.org/james/RunAsService

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -26,3 +26,55 @@
  ln -s /home/telrock/apps/james/bin/phoenix.sh /etc/init.d/james
  update-rc.d james start 21 2 3 4 5 . stop 19 0 1 6 .
 }}}
+
+
+'''Update for Mandrake Linux'''
+
+If you're running Mandrake or any distro that uses config files in the 
/etc/rc.d/init.d directory, there're two much simpler ways. Well, two ways of 
doing the same thing actually. The first is to create a file in the 
/etc/rc.d/init.d directory called james with the following contents (remember 
to replace /home/james/james with the actual location of your james 
installation):
+
+{{{
+ #!/bin/sh
+ # description: JAMES Mail Server
+ # chkconfig: 2345 99 00
+ 
+ case "$1" in
+ 'start')
+         /home/james/james/bin/phoenix.sh start
+         touch /var/lock/subsys/james
+         ;;
+ 'stop')
+         /home/james/james/bin/phoenix.sh stop
+         rm -f /var/lock/subsys/james
+         ;;
+ *)
+         echo "Usage: $0 { start | stop }"
+         ;;
+ esac
+ exit 0
+}}}
+
+Alternatively, if you've got webmin installed, go to the system section and 
select "Bootup and Shutdown". Near the top of the page you'll see a link to 
create a new bootup and shutdown action. You can use that to create a service 
that's run at startup and shutdown. Just specify the comand: 
+
+{{{
+ /home/james/james/bin/phoenix.sh start
+}}}
+
+in the box where it asks you for the bootup commands, and specify this command 
in the box where it asks for the shutdown commands:
+
+{{{
+ /home/james/james/bin/phoenix.sh stop
+}}}
+
+That should be it. You can test it by running 
+
+{{{
+ /etc/rc.d/init.d/james start
+}}}
+
+to start and 
+
+{{{
+ /etc/rc.d/init.d/james start
+}}}
+
+to stop it.

Reply via email to