10-init.sh 523 B

12345678910
  1. # If /dev/log is either a named pipe or it was placed there accidentally,
  2. # e.g. because of the issue documented at https://github.com/phusion/baseimage-docker/pull/25,
  3. # then we remove it.
  4. if [ ! -S /dev/log ]; then rm -f /dev/log; fi
  5. if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
  6. if [[ ! -p /docker.stdout ]]; then
  7. # Switch to file (tty docker mode)
  8. go-replace -s 'pipe("/docker.stdout")' -r 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf
  9. fi