Start-Stop Script for OSCam [Linux]
03.12.09
Here's a small start-stop script for OSCAM for AVG as well as for the LITE, or for all Linux PCs
HowTo
Create a symlink to the version of the current shows, for example, ln -s / usr/local/bin/oscam_i686_pc_linux_svn665 / usr / local / bin / OSCAM
the start-stop-script to / etc copy / init.d and run chmod 755 OSCAM
Now you can as root / etc / init.d to / OSCAM start or stop, etc.
Gracias a DonDrogoMilo
03.12.09
Here's a small start-stop script for OSCAM for AVG as well as for the LITE, or for all Linux PCs
HowTo
Create a symlink to the version of the current shows, for example, ln -s / usr/local/bin/oscam_i686_pc_linux_svn665 / usr / local / bin / OSCAM
the start-stop-script to / etc copy / init.d and run chmod 755 OSCAM
Now you can as root / etc / init.d to / OSCAM start or stop, etc.
Code:
#!/bin/sh
DAEMON=/usr/local/bin/oscam
DEAMON_OPTS="-b"
PIDFILE=/var/run/oscam.pid
test -x ${DAEMON} || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting OScam"
start-stop-daemon --start --quiet --background --pidfile ${PIDFILE} --make-pidfile --exec ${DAEMON} -- ${DAEMON_OPTS}
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping OScam"
start-stop-daemon --stop --exec ${DAEMON}
log_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/oscam {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
Gracias a DonDrogoMilo