[no ci] Package: update S95majestic

pull/1382/head
Viktor 2024-04-05 10:58:47 +02:00
parent af627408c3
commit 75a87535be
2 changed files with 12 additions and 16 deletions

View File

@ -29,6 +29,10 @@ network() {
/etc/init.d/S40network "$1"
}
streamer() {
/etc/init.d/S95majestic "$1"
}
set_fullname() {
show_fullname > /etc/hostname
}

View File

@ -4,14 +4,13 @@ DAEMON="majestic"
PIDFILE="/var/run/$DAEMON.pid"
MAJESTIC_ARGS="-s"
debug_majestic() {
[ -f /etc/coredump.conf ] && . /etc/coredump.conf
if [ "$coredump_enabled" ]; then
ulimit -c unlimited && echo "|/usr/sbin/sendcoredump.sh" > /proc/sys/kernel/core_pattern
fi
debug() {
ulimit -c unlimited
echo "/root/core.%e.%h.%t" > /proc/sys/kernel/core_pattern
}
load_majestic() {
start() {
export SENSOR=$(fw_printenv -n sensor)
printf "Starting $DAEMON: "
start-stop-daemon -b -S -m -q -p "$PIDFILE" -x "/usr/bin/$DAEMON" -- $MAJESTIC_ARGS
if [ $? = 0 ]; then
@ -21,13 +20,6 @@ load_majestic() {
fi
}
start() {
logger -s -p daemon.info -t $(ipcinfo -v) "Loading video system..."
export SENSOR=$(fw_printenv -n sensor)
debug_majestic
load_majestic
}
stop() {
printf "Stopping $DAEMON: "
start-stop-daemon -K -q -p "$PIDFILE"
@ -40,18 +32,18 @@ stop() {
}
case "$1" in
start|stop)
start|stop|debug)
"$1"
;;
restart)
stop
sleep 3
load_majestic
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
echo "Usage: $0 {start|stop|debug|restart}"
exit 1
;;
esac