Advertisement
GoodGuys

/etc/init/oscam.conf

Jan 3rd, 2012
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. # oscam - the OSCAM card reader thingy
  2. #
  3.  
  4. description "OSCAM card reader service"
  5. author "nobody@hometheater.co.il"
  6.  
  7. start on (local-filesystems and net-device-up IFACE=lo and started udev-finish)
  8. stop on runlevel [016]
  9.  
  10. expect fork
  11. normal exit 0
  12. respawn
  13.  
  14. pre-start script
  15. # move the old logfile
  16. logfile=/var/log/oscam.log
  17. mv ${logfile} ${logfile}.prev
  18. exit 0
  19. end script
  20.  
  21. exec oscam -b -s -r 0 -c /usr/local/etc
  22.  
  23. # wait for
  24. post-start script
  25. # wait until init is done
  26. logfile=/var/log/oscam.log
  27. finished=0
  28. count=0
  29. while [ $finished -eq 0 -a $count -lt 60 ]; do
  30. grep -q 'init for all local cards done' $logfile && finished=1
  31. sleep 1
  32. count=$((count+1))
  33. done
  34. exit 0
  35. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement