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

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

SAP SWPM Software Provision Manager SL Toolset 1.0 SP22 Startup Options

SAP SystemCopy - Activation of TCI Notes, DigiSIgn Gone Wrong