mirror of https://github.com/OpenIPC/firmware.git
[no ci] Package: update S95majestic
parent
af627408c3
commit
75a87535be
|
@ -29,6 +29,10 @@ network() {
|
||||||
/etc/init.d/S40network "$1"
|
/etc/init.d/S40network "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
streamer() {
|
||||||
|
/etc/init.d/S95majestic "$1"
|
||||||
|
}
|
||||||
|
|
||||||
set_fullname() {
|
set_fullname() {
|
||||||
show_fullname > /etc/hostname
|
show_fullname > /etc/hostname
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,13 @@ DAEMON="majestic"
|
||||||
PIDFILE="/var/run/$DAEMON.pid"
|
PIDFILE="/var/run/$DAEMON.pid"
|
||||||
MAJESTIC_ARGS="-s"
|
MAJESTIC_ARGS="-s"
|
||||||
|
|
||||||
debug_majestic() {
|
debug() {
|
||||||
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
|
ulimit -c unlimited
|
||||||
if [ "$coredump_enabled" ]; then
|
echo "/root/core.%e.%h.%t" > /proc/sys/kernel/core_pattern
|
||||||
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
load_majestic() {
|
start() {
|
||||||
|
export SENSOR=$(fw_printenv -n sensor)
|
||||||
printf "Starting $DAEMON: "
|
printf "Starting $DAEMON: "
|
||||||
start-stop-daemon -b -S -m -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- $MAJESTIC_ARGS
|
start-stop-daemon -b -S -m -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- $MAJESTIC_ARGS
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
|
@ -21,13 +20,6 @@ load_majestic() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
|
||||||
logger -s -p daemon.info -t $(ipcinfo -v) "Loading video system..."
|
|
||||||
export SENSOR=$(fw_printenv -n sensor)
|
|
||||||
debug_majestic
|
|
||||||
load_majestic
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
printf "Stopping $DAEMON: "
|
printf "Stopping $DAEMON: "
|
||||||
start-stop-daemon -K -q -p "$PIDFILE"
|
start-stop-daemon -K -q -p "$PIDFILE"
|
||||||
|
@ -40,18 +32,18 @@ stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start|stop)
|
start|stop|debug)
|
||||||
"$1"
|
"$1"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
restart)
|
restart)
|
||||||
stop
|
stop
|
||||||
sleep 3
|
sleep 3
|
||||||
load_majestic
|
start
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|restart}"
|
echo "Usage: $0 {start|stop|debug|restart}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue