-
Notifications
You must be signed in to change notification settings - Fork 49
/
starter.sh
executable file
·49 lines (41 loc) · 1.3 KB
/
starter.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/ash
source internal/set-defaults
source /config/container_config
if [ "$CONTAINER_SILENT" != "on" ]; then
echo `cat CONTAINER.name` version `cat CONTAINER.release` - `cat CONTAINER.homepage`
echo `cat CONTAINER.copyright`
echo
echo "WARNING: this is an experimental container - do not use in production"
echo
fi
if [ "$USE_VALGRIND" = "on" ]; then
source internal/install-valgrind
export VALGRIND=valgrind
fi
if [ "$SYSLOG_APPLIANCE_DEBUG" = "on" ]; then
echo APPLIANCE IS IN DEBUG MODE
env
ls -l /config
#RSYSLOG_DEBUG_FLAG=-d
fi
# Set $RSYSLOG_CONFIG_BASE64 to overwrite /etc/rsyslog.conf with base64 encoded config
# Useful to inject rsyslog.conf file without mounting it into the container
if [ ! -z "$RSYSLOG_CONFIG_BASE64" ]; then
echo "Writing RSYSLOG_CONFIG_BASE64"
echo "$RSYSLOG_CONFIG_BASE64" | base64 -d > /config/rsyslog.conf
export RSYSLOG_CONF="/config/rsyslog.conf"
fi
# If RSYSLOG_CONF is empty, we want to default to /etc/rsyslog.conf
# This allows the user to overwrite what configuration file is being used
if [ -z "$RSYSLOG_CONF" ]; then
export RSYSLOG_CONF="/etc/rsyslog.conf"
fi
echo "Using rsyslog configuration file: $RSYSLOG_CONF"
if [ -f tools/$1 ]; then
source tools/$1
else
echo "ERROR: command not known: $*"
echo
source tools/help
exit 1
fi