Skip to content

Commit f42a0ec

Browse files
committed
Improve base
Syslog: switch dynamically to pipe() and file() (based on decicion if tty is available or not) Sypervisor: add example for auth
1 parent c160757 commit f42a0ec

File tree

34 files changed

+92
-12
lines changed

34 files changed

+92
-12
lines changed

docker/base/alpine-3/conf/bin/service.d/syslog-ng.d/10-init.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
# then we remove it.
44
if [ ! -S /dev/log ]; then rm -f /dev/log; fi
55
if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
6+
7+
if [[ ! -p /docker.stdout ]]; then
8+
# Switch to file (tty docker mode)
9+
rpl --quiet 'pipe("/docker.stdout")' 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf &> /dev/null
10+
fi

docker/base/alpine-3/conf/etc/syslog-ng/syslog-ng.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ filter f_filter {
3535

3636
destination d_all {
3737
# syslog-d_all START
38-
file("/docker.stdout");
38+
pipe("/docker.stdout");
3939
# syslog-d_all END
4040
};
4141

docker/base/centos-7/conf/bin/service.d/syslog-ng.d/10-init.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
# then we remove it.
44
if [ ! -S /dev/log ]; then rm -f /dev/log; fi
55
if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
6+
7+
if [[ ! -p /docker.stdout ]]; then
8+
# Switch to file (tty docker mode)
9+
rpl --quiet 'pipe("/docker.stdout")' 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf &> /dev/null
10+
fi

docker/base/centos-7/conf/etc/syslog-ng/syslog-ng.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ filter f_filter {
3535

3636
destination d_all {
3737
# syslog-d_all START
38-
file("/docker.stdout");
38+
pipe("/docker.stdout");
3939
# syslog-d_all END
4040
};
4141

docker/base/debian-7/conf/bin/service.d/syslog-ng.d/10-init.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
# then we remove it.
44
if [ ! -S /dev/log ]; then rm -f /dev/log; fi
55
if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
6+
7+
if [[ ! -p /docker.stdout ]]; then
8+
# Switch to file (tty docker mode)
9+
rpl --quiet 'pipe("/docker.stdout")' 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf &> /dev/null
10+
fi

docker/base/debian-7/conf/etc/supervisor.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ nodaemon=true
33

44
[unix_http_server]
55
file = /var/run/supervisor.sock
6+
# username = root
7+
# password = {SHA}e982f17bcbe0f724063b708a4f76db211a999304
68

79
[rpcinterface:supervisor]
810
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

docker/base/debian-7/conf/etc/syslog-ng/syslog-ng.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ filter f_filter {
3535

3636
destination d_all {
3737
# syslog-d_all START
38-
file("/docker.stdout");
38+
pipe("/docker.stdout");
3939
# syslog-d_all END
4040
};
4141

docker/base/debian-8/conf/bin/service.d/syslog-ng.d/10-init.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
# then we remove it.
44
if [ ! -S /dev/log ]; then rm -f /dev/log; fi
55
if [ ! -S /var/lib/syslog-ng/syslog-ng.ctl ]; then rm -f /var/lib/syslog-ng/syslog-ng.ctl; fi
6+
7+
if [[ ! -p /docker.stdout ]]; then
8+
# Switch to file (tty docker mode)
9+
rpl --quiet 'pipe("/docker.stdout")' 'file("/docker.stdout")' -- /opt/docker/etc/syslog-ng/syslog-ng.conf &> /dev/null
10+
fi

docker/base/debian-8/conf/etc/supervisor.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ nodaemon=true
33

44
[unix_http_server]
55
file = /var/run/supervisor.sock
6+
# username = root
7+
# password = {SHA}e982f17bcbe0f724063b708a4f76db211a999304
68

79
[rpcinterface:supervisor]
810
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

docker/base/debian-8/conf/etc/syslog-ng/syslog-ng.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ filter f_filter {
3535

3636
destination d_all {
3737
# syslog-d_all START
38-
file("/docker.stdout");
38+
pipe("/docker.stdout");
3939
# syslog-d_all END
4040
};
4141

0 commit comments

Comments
 (0)