show-runit/service/fakeapp3/log/run
2016-07-16 18:09:54 +02:00

14 lines
389 B
Bash

#!/bin/sh
# file: fakeapp3/log/run
# Collect all logs which come to /dev/log (syslog) from the app
exec 2>&1
echo $(realpath $0) started
mkdir /var/log/fakeapp3 2>/dev/null
# savelog -n -c 7 /var/log/fakeapp3/current
# exec sh -c "chpst -Unobody socklog unix /dev/log | tee -a /var/log/fakeapp3/current"
exec sh -c "chpst -Unobody socklog unix /dev/log | svlogd -tt /var/log/fakeapp3"