Service does not support chkconfig


I wanted to add a script to run automatically on startup/reboot.
chkconfig it is.

my original script:


#!/bin/bash
echo "ayam" > /tmp/test.txt


But when adding to chkconfig, using chkconfig --add
received the error:

Service does not support chkconfig.

Googling, found this two URLS:
- http://linux.about.com/library/cmd/blcmdl8_chkconfig.htm
- http://blog.tuxforge.com/service-does-not-support-chkconfig/

But the 2nd link seems not that proper. We still need the "#" before chkconfig word. My final script was as below:


#!/bin/bash
# chkconfig: 2345 95 20
# description: Description of the script
# processname: Echoing ayam.

echo "ayam" > /tmp/test.txt


Now works like a charm.

//alak

Comments

Popular posts from this blog

Check SecStore KeyPhrase of Java Stack

Windows 2003 W2k3 Getting Current MTU Size

Python: thread.error: can't start new thread