Linux.com

Author Message
Joined: Feb 22, 2008
Posts: 7
Other Topics
Posted Mar 06, 2008 at 3:22:19 AM
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.
Back to top Profile Email Website
Shashank Sharma
Joined Jan 01, 1970
Posts: 1657
Location:New Delhi, India

Other Topics
Posted: Mar 09, 2008 11:33:12 AM
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!

Coauthor of Beginning Fedora: From Novice to Professional published by Apress.

Please follow the Forum Guidelines

Back to top Profile Email Website Yahoo!
neikel
Joined Feb 22, 2008
Posts: 7

Other Topics
Posted: Mar 10, 2008 10:20:58 AM
Subject: Help: Startup script
I'm using Redhat Enterprise AS 3. However, I build krb5kdc manually without using of rpm.
Back to top Profile Email Website
Shashank Sharma
Joined Jan 01, 1970
Posts: 1657
Location:New Delhi, India

Other Topics
Posted: Mar 10, 2008 1:04:49 PM
Subject: Help: Startup script
Instead of chkconfig --add krb5kdc command try this chkconfig krb5kdc on I wonder if that'll work.

Coauthor of Beginning Fedora: From Novice to Professional published by Apress.

Please follow the Forum Guidelines

Back to top Profile Email Website Yahoo!
neikel
Joined Feb 22, 2008
Posts: 7

Other Topics
Posted: Mar 10, 2008 6:41:10 PM
Subject: Help: Startup script
I received the same error. Thank you very much for your help. Anyway, I appreciate your help. Any suggestion please :)
Back to top Profile Email Website
Mumu
Joined Apr 05, 2008
Posts: 7

Other Topics
Posted: Apr 05, 2008 1:13:01 AM
Subject: 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

Web CV : Bergues

Back to top Profile Email Website
neikel
Joined Feb 22, 2008
Posts: 7

Other Topics
Posted: Apr 08, 2008 9:02:43 AM
Subject: Help: Startup script
now I understand that description must not be empty. Thanks.
Back to top Profile Email Website
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya