|
Author |
Message |
|
|
Posted : Thu, 06 March 2008 03:22:19
Subject :
Help: Startup script
Hi, I'm attempting to create a startup script for krb5kdc daemon to start automatically at the booting of system.
And here is my content of krb5kdc script:
[code]
*************************************************************************************
#! /bin/bash
#
# krb5kdc Start/Stop the krb5kdc daemon.
#
# chkconfig: - 9 60
# description:
# processname: krb5kdc
# config:
# pidfile:
# Source function library.
. /etc/init.d/functions
RETVAL=0
# See how we were called.
prog="krb5kdc"
start() {
echo -n $"Starting $prog: "
daemon krb5kdc
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/krb5kdc
return $RETVAL
}
stop() {
echo -n $"Stopping $prog: "
killproc krb5kdc
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/krb5kdc
return $RETVAL
}
rhstatus() {
status krb5kdc
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading krb5kdc daemon configuration: "
killproc krb5kdc -HUP
retval=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
krb5kdcrestart)
[ -f /var/lock/subsys/krb5kdc ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|krb5kdcrestart}"
exit 1
esac
exit $?
*************************************************************************************[/code]
then I place this file in /etc/rc.d/init.d directory and use
chkconfig --add krb5kdc
I got :
service krb5kdc does not support chkconfig
Any suggestion please.
Thank you.
|
|
|
|
Shashank Sharma
|
Posted : Sun, 09 March 2008 11:33:12
Subject :
Help: Startup script
What Linux distribution are you running? You'd be better of using the /etc/rc.local file.
Just put your script in the /etc/rc.local file and it will run during every boot.
Cheers!
|
|
neikel
|
Posted : Mon, 10 March 2008 10:20:58
Subject :
Help: Startup script
I'm using Redhat Enterprise AS 3.
However, I build krb5kdc manually without using of rpm.
|
|
Shashank Sharma
|
Posted : Mon, 10 March 2008 13:04:49
Subject :
Help: Startup script
Instead of chkconfig --add krb5kdc command try this
chkconfig krb5kdc on
I wonder if that'll work.
|
|
neikel
|
Posted : Mon, 10 March 2008 18:41:10
Subject :
Help: Startup script
I received the same error.
Thank you very much for your help.
Anyway, I appreciate your help.
Any suggestion please :)
|
|
Mumu
|
Posted : Sat, 05 April 2008 01:13:01
Subject :
Re: Help: Startup script
[code=xml][root@localhost init.d]# chkconfig --add continuum
service continuum does not support chkconfig
Looking at the shell script, it's missing the chkconfig commentaries, so I added them:
#! /bin/sh
1. chkconfig: 345 20 80
2. description: Maven Continuum server
Now everything is fine:
[root@localhost init.d]# chkconfig --add continuum
[root@localhost init.d]# chkconfig continuum on
[root@localhost init.d]# service continuum start
Starting continuum...[/code]
perhaps it can help you
http://jira.codehaus.org/browse/CONTINUUM-655
|
|
neikel
|
Posted : Tue, 08 April 2008 09:02:43
Subject :
Help: Startup script
now I understand that description must not be empty.
Thanks.
|