Skip to content

Commit

Permalink
Updated based on review
Browse files Browse the repository at this point in the history
- Changed startup to depend on nevironment variable
- Fixed uid/gid
- Shortened final sleep before restart (not sure about this one)
  • Loading branch information
Olen authored Nov 18, 2022
1 parent 693c446 commit 3b83e86
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rootfs/etc/cont-init.d/04-svc-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ chmod +x /etc/services.d/snmpd/run
mkdir -p /etc/services.d/ircbot
cat >/etc/services.d/ircbot/run <<EOL
#!/usr/bin/with-contenv sh
if [ $(lnms config:get irc_alert) == "true" ]; then
s6-setuidgid 1000:992
/opt/librenms/irc.php
if [ ${LIBRENMS_IRC_SERVICE:-0} == "1" ]; then
s6-setuidgid ${PUID}:${PGID} /opt/librenms/irc.php
fi
sleep 60
sleep 10
EOL
chmod +x /etc/services.d/ircbot/run

0 comments on commit 3b83e86

Please sign in to comment.