Compare commits
No commits in common. "736b0fa01663d12a94a344f1551cf6cb7f789266" and "126759a097449c925427b573c21768c9d2b836c8" have entirely different histories.
736b0fa016
...
126759a097
2 changed files with 0 additions and 36 deletions
|
@ -30,6 +30,3 @@ matrix:
|
|||
- ALPINE_VERSION: 3.15.4
|
||||
RUBY_VERSION: 3.0
|
||||
RUBY_PATCH: 4
|
||||
- ALPINE_VERSION: 3.16.0
|
||||
RUBY_VERSION: 3.1
|
||||
RUBY_PATCH: 2
|
||||
|
|
33
syslogize.sh
33
syslogize.sh
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
# A wrapper for programs that can't write to syslog. Output and error
|
||||
# are sent to syslog.
|
||||
#
|
||||
# Use LOGGER environment variable to pass options to `logger`. They'll
|
||||
# probably be system-dependent, so handle with care.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# LOGGER="-t program" syslogize program -o -p --tions argu ments
|
||||
#
|
||||
# daemonize /usr/local/bin/syslogize program
|
||||
|
||||
if test $# -eq 0 ; then
|
||||
grep "^#" $0 | grep -v /bin/sh | sed -re "s/^#\s*//" >&2
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOGGER="${LOGGER:--t $1}"
|
||||
|
||||
propagate_signal () {
|
||||
logger ${LOGGER} "Received $1 signal"
|
||||
jobs -p | xargs kill -$1
|
||||
}
|
||||
|
||||
for signal in HUP INT QUIT USR1 USR2 TERM; do
|
||||
trap "propagate_signal ${signal}" ${signal}
|
||||
done
|
||||
|
||||
$@ 2>&1 | logger ${LOGGER} &
|
||||
|
||||
wait $!
|
Loading…
Reference in a new issue