Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

RHEL Service imapd.rc does not support chkconfig
https://forum.ivorde.com/rhel-service-imapd-rc-does-not-support-chkconfig-t24.html
Page 1 of 1

Author:  admin [ Thu Aug 13, 2009 10:26 am ]
Post subject:  RHEL Service imapd.rc does not support chkconfig

While trying to add the courier imap service to red hat services start-up list, I got this error:
Code:
# ln -s /usr/local/libexec/imapd.rc /etc/init.d
# chkconfig --add imapd.rc
service imapd.rc does not support chkconfig


For the chkconfig binary to be able to add a service based on it's startup script, it needs to have a special format.

I added in the beginning of the rc script the following
Code:
#! /bin/sh
# chkconfig: 2345 95 20
# description: imapd
# What your script does (not sure if this is necessary though)
# processname: imapd

2345 are the runlevels for which this service will be activated (at startup), 95 is the startup sequence number.
saved it and added the service:
Code:
# chkconfig --add imapd.rc
# chkconfig --list | grep imap
imapd.rc        0:off   1:off   2:on    3:on    4:on    5:on    6:off


Not quite as professional (the .rc in service name) as I'd want, but it can easily be modified.

Author:  admin [ Thu Aug 13, 2009 10:45 am ]
Post subject:  Re: RHEL Service imapd.rc does not support chkconfig

forgot to mention that the x permission must be set on /usr/local/libexec/imapd.rc.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/