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.
_________________
VPSie - SSD VPS servers in AMS-IX, LINX, DE-CIX
https://vpsie.com