Hallo ich möchte mein Oscam hin und wieder aus ferne restarten via putty(manchmal hängt oscam console) hab es mit folgenden script versucht:
leider /etc/init.d/oscam restart bringt nix, in befehl zeile steht "[....] Stopping oscam: oscam" und passiert nix mehr.
bei /etc/init.d/oscam reload "Reloading oscam configuration files
No /usr/local/bin/oscam found running; none killed."
was mach ich falsch?
up ..........
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: oscam
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: open source cam
### END INIT INFO
# /etc/init.d/oscam
#
set -e
DAEMON=/usr/local/bin/oscam
NAME=oscam
OPTIONS=-b
PIDFILE=/var/run/bin/oscam.pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin
test -x $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting oscam" "oscam"
[ -d /var/run/oscam ] || mkdir -p /var/run/oscam
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $OPTIONS
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping oscam" "oscam"
start-stop-daemon --stop --quiet --pidfile $PIDFILE
log_end_msg $?
rm -f $PIDFILE
;;
restart)
$0 stop && sleep 2 && $0 start
;;
reload|force-reload)
echo "Reloading $NAME configuration files"
start-stop-daemon --stop --pidfile $PIDFILE --signal 1 --exec $DAEMON
echo "."
;;
status)
pidofproc -p $PIDFILE $DAEMON >/dev/null
status=$?
if [ $status -eq 0 ]; then
log_success_msg "oscam is running."
else
log_failure_msg "oscam is not running."
fi
exit $status
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"
exit 1
;;
esac
exit 0
bei /etc/init.d/oscam reload "Reloading oscam configuration files
No /usr/local/bin/oscam found running; none killed."
was mach ich falsch?
up ..........
Zuletzt bearbeitet von einem Moderator: