init.d service start Question
Hello:
I am trying to setup a new service under Fedora. I have done the following so far:
Created a file in /etc/rc.d/init.d named "viper"
Performed the required chkconfig --add myservice to have a symbolic link created in the rc2.d directory that points to my file in init.d
I am running into issues when I try to start the service and I know it is because of my init.d file. At the top of the file I did put the required chkconfig entry (2345 90 10).
So here is the big question. I am not sure what to put in the start () command to get my service to actually start. I know how to start it via command line but when I put this command in the start() area, it bombs with the following error:
Starting viper: execvp: No such file or directory
I know it must be something dumb I am doing but in the start() routine, here is how I am trying to start it:
DAEMON=viper
prog=viper
start () {
echo -n $Starting $prog: "
# start daemon
daemon $DAEMON
if [ -f /usr/viper/bin/viper ]; then
/usr/viper/bin/viper
fi
[ $RETVAL = 0] && touch /var/lock/subsys/viper
touch /var/lock/subsys/viper
return $RETVAL
RETVAL=$?
echo
}
When I issue the command /usr/viper/bin/viper on any command line, my script will start but not with this.
Any and All Help MUCH APPRECIATED!
Mike
|