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

SAP: Segregate Different SMTP Mail Server Based on Sender Domain

SAP Client Copy Error: Errors occurred during export of container object FINB-TR-DERIVATION

Quick Dirty Script for Checking Oracle Data Gurad Gap and Emailing it