Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # oscam - the OSCAM card reader thingy
- #
- description "OSCAM card reader service"
- author "nobody@hometheater.co.il"
- start on (local-filesystems and net-device-up IFACE=lo and started udev-finish)
- stop on runlevel [016]
- expect fork
- normal exit 0
- respawn
- pre-start script
- # move the old logfile
- logfile=/var/log/oscam.log
- mv ${logfile} ${logfile}.prev
- exit 0
- end script
- exec oscam -b -s -r 0 -c /usr/local/etc
- # wait for
- post-start script
- # wait until init is done
- logfile=/var/log/oscam.log
- finished=0
- count=0
- while [ $finished -eq 0 -a $count -lt 60 ]; do
- grep -q 'init for all local cards done' $logfile && finished=1
- sleep 1
- count=$((count+1))
- done
- exit 0
- end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement