[+] Debian8 64 bit VPS nie działa skrypt
: 19 lutego 2016, 19:50
Witam
mam taki problem ze skryptem na starym debianie na vps działa bez problemu na nowym 8 niestety nie
skrypt w etc/init.d/rc.local
/var/log/watchdog
gdzie mam błąd??
mam taki problem ze skryptem na starym debianie na vps działa bez problemu na nowym 8 niestety nie
skrypt w etc/init.d/rc.local
Kod: Zaznacz cały
#! /bin/sh
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $remote_fs $syslog $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
do_start() {
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
/etc/rc.local
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
[B]oscam -b /usr/local/etc/oscam.conf
sleep 10
#!/bin/sh
while [ 1 ]
do
PROCESY=`ps -aux | grep oscam | grep -v "grep oscam"`
if [ "$PROCESY" = "" ]
then
echo $(date) "oscam uruchomiony przez watchdoga" >> /var/log/watchdog
/usr/sbin/oscam -b
fi
sleep 10
done[/B]
exit 0
Kod: Zaznacz cały
Fri Dec 25 22:44:27 UTC 2015 oscam uruchomiony przez watchdoga
Sun Jan 31 09:33:15 UTC 2016 oscam uruchomiony przez watchdoga[/QUOTE]
debian 8 tu mam inną ścieżkę oscama ale wpisane ok
etc/init.d/rc.local
[quote]#! /bin/sh
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
do_start() {
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
/etc/rc.local
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop|status)
# No-op
[B]/usr/local/bin/oscam -b -r2
sleep 10
#!/bin/sh
while [ 1 ]
do
PROCESY=`ps -aux | grep oscam | grep -v "grep oscam"`
if [ "$PROCESY" = "" ]
then
echo $(date) "oscam uruchomiony przez watchdoga" >> /var/log/watchdog
/usr/local/bin/oscam -b
fi
sleep 10
done[/B]
exit 0
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac