Looks to me like your if statement is borked, but thats just my opinion..
Try;
if [ -f /var/lock/acu_servers ] ; then
exit 1
else
echo "Starting script acu_servers "
cd /home/eclipse
/home/eclipse/acu_server &
/home/eclipse/acu_rt_server &
touch /var/lock/acu_servers
fi
Hth..
Neil Stone
-----Original Message-----
From: Jongsoo Kim <>
Sent: 10 May 2010 22:47
To:
Subject: [ts-7000] [ts-7500] beginner question: boot script in /etc/init.d and
/etc/rc2.d
Dear group
I realized I am a very beginner to Linux ( I thought I knew OK).
We wrote two programs "acu_server" and "acu_rt_server" and I am trying to
make these program start when TS7500 boots. I saved the binary files of
"acu_server" and "acu_rt_server" under /home/eclipse ( I just decided to
use eclipse directory just for convenience since I am using eclipse)
After some study of Debian, a simple following script called "acu_servers"
was written and copied into /etc/init.d directory and then "update-rc.d
acu_servers defaults" was issued.
The problems is during boot, I see the correct boot output message shows up
But if I do "ps -v", my two programs are not running.
As usual, I greatly appreciate if someone can kindly advise me.
#! /bin/sh
### BEGIN INIT INFO
# Provides: acu_servers
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start acu_server and acu_rt_server
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "$1" in
start)
if test -f /var/lock/acu_servers; then
exit 1
fi
echo "Starting script acu_servers "
cd /home/eclipse
/home/eclipse/acu_server &
/home/eclipse/acu_rt_server &
touch /var/lock/acu_servers
;;
stop)
echo "Stopping script acu_servers"
killall acu_server acu_rt_server
rm -f /var/lock/acu_servers
;;
*)
echo "Usage: /etc/init.d/acu_servers {start|stop}"
exit 1
;;
esac
exit 0
Thanks
Jongsoo Kim
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|