You are not logged in.
Pages: 1
While this program is active, it is monitoring some data output. When i run this rc script it doesn't drop to console. It shows busy all the time.(it is writing "BUSY" but the program is working properly.)
[root@arch ozgur]# /etc/rc.d/sascd start
:: Starting SASC-NG [BUSY]
Because of this, it freezes in the boot process.
I am trying to drop to console without monitoring.
I tried this conbinations:
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION &
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION & || return 1
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION &> /dev/null 2>&1
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION &> /dev/null
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION &> /dev/null || return 1
But its not working. Anybody has any suggestions?
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
PID=`pidof -o %PPID /usr/bin/sasc-ng`
[ -f /etc/sasc.conf ] && source /etc/sasc.conf
case "$1" in
start)
stat_busy "Starting SASC-NG"
/sbin/modprobe dvbloopback $LOOPDRIVEROPTION
sleep 2
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
echo $PID > /var/run/sasc-ng.pid
add_daemon sasc-ng
stat_done
fi
;;
stop)
stat_busy "Stopping SASC-NG"
[ ! -z "$PID" ] && kill $PID &> /dev/null
rmmod dvbloopback &
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon sasc-ng
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
;;
esac
exit 0
Offline
Ok found it. This is what i need
[ -z "$PID" ] && /usr/bin/sasc-ng $SASCOPTION > /var/log/sascd 2>&1 &
Offline
make sure to create a cron job to empty out /var/log/sascd every once in a while, though.
Offline
Pages: 1