From 75a87535beb2ca6bd95a5900bc3667e1934587ba Mon Sep 17 00:00:00 2001 From: Viktor <35473052+viktorxda@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:58:47 +0200 Subject: [PATCH] [no ci] Package: update S95majestic --- general/overlay/etc/profile | 4 ++++ general/package/majestic/files/S95majestic | 24 ++++++++-------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/general/overlay/etc/profile b/general/overlay/etc/profile index 399687d8..bb0c28a9 100644 --- a/general/overlay/etc/profile +++ b/general/overlay/etc/profile @@ -29,6 +29,10 @@ network() { /etc/init.d/S40network "$1" } +streamer() { + /etc/init.d/S95majestic "$1" +} + set_fullname() { show_fullname > /etc/hostname } diff --git a/general/package/majestic/files/S95majestic b/general/package/majestic/files/S95majestic index 9e12bc48..3f4becc6 100755 --- a/general/package/majestic/files/S95majestic +++ b/general/package/majestic/files/S95majestic @@ -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