Skip to content

Commit

Permalink
modified ReGaHss init script to make sure the pid file will have world
Browse files Browse the repository at this point in the history
readable permissions so that hss_led can query its status.
  • Loading branch information
jens-maus committed Sep 26, 2023
1 parent 24db516 commit 559b86b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion buildroot-external/overlay/WebUI/etc/init.d/S70ReGaHss
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,22 @@ start() {
echo -n "Starting ReGaHss: "
init

# make sure ReGaHss will run on umask 0027 per default
# make sure ReGaHss will run on umask 0027 per default so
# that files/dirs will not be generated world readable per default
umask 0027

# adjust the oom score (which is inherited by start-stop-daemon)
# to ensure that others are killed first in case of low memory situations
echo -900 >/proc/$$/oom_score_adj 2>/dev/null

# start ReGaHss
start-stop-daemon -S -q -b -m -p ${PIDFILE} --exec /bin/${REGA_BIN_FILE} -- -f /etc/rega.conf -l ${LOGLEVEL_REGA}

# wait until ReGaHss is started.
waitStartupComplete

# make sure the PID file has world readable permissions
chmod 0644 ${PIDFILE}
}

stop() {
Expand Down

0 comments on commit 559b86b

Please sign in to comment.