File: check

package info (click to toggle)
runit 2.2.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,568 kB
  • sloc: ansic: 6,071; sh: 3,419; makefile: 399
file content (14 lines) | stat: -rwxr-xr-x 511 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
# try socklog, ucspi-unix, fuser; if all fail fallback to the old code
socklog-check && exit 0

unixclient /dev/log /bin/true 2>&1 | grep -q '^connect: Protocol wrong type for socket' && exit 0

fuser /dev/log >/dev/null 2>/dev/null && exit 0 # psmisc is not essential+not available on Hurd

# note: only socklog exists as runit service in Debian right now
for service in rsyslog socklog-unix syslog-ng busybox-syslogd inetutils-syslogd ; do
	sv u $service && sv check $service && exit 0
done

exit 1