feat: add the busybox-syslogd service
This commit is contained in:
25
config/root/etc/s6-overlay/s6-rc.d/busybox-syslogd/run
Executable file
25
config/root/etc/s6-overlay/s6-rc.d/busybox-syslogd/run
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/command/with-contenv bash
|
||||
|
||||
install_pkg() {
|
||||
apt-get update && apt-get install -y busybox busybox-syslogd
|
||||
}
|
||||
|
||||
set -e
|
||||
cd /
|
||||
|
||||
install -d -o root -g app -m 0750 /run/app/log
|
||||
|
||||
command -v busybox >/dev/null || install_pkg
|
||||
|
||||
HOST=127.0.0.1
|
||||
PORT=6514
|
||||
export HOST PORT
|
||||
|
||||
config='/run/app/log/.syslog.conf'
|
||||
logfile='/run/app/log/messages'
|
||||
|
||||
: >| "${config}"
|
||||
|
||||
exec busybox syslogd -n -S -l 8 -f "${config}" \
|
||||
-b 9 -s 2048 -O "${logfile}" \
|
||||
-L -R "${HOST}:${PORT}"
|
||||
1
config/root/etc/s6-overlay/s6-rc.d/busybox-syslogd/type
Normal file
1
config/root/etc/s6-overlay/s6-rc.d/busybox-syslogd/type
Normal file
@@ -0,0 +1 @@
|
||||
longrun
|
||||
Reference in New Issue
Block a user