-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathentrypoint.sh
More file actions
43 lines (33 loc) · 939 Bytes
/
entrypoint.sh
File metadata and controls
43 lines (33 loc) · 939 Bytes
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
#!/bin/bash
# Initialize msmtprc:
echo
echo "Configuring msmtprc ... "
echo
sudo sed -i "s|SMTP_RELAY|${SMTP_RELAY}|g" /etc/msmtprc
sudo sed -i "s|SMTP_PORT|${SMTP_PORT}|g" /etc/msmtprc
sudo sed -i "s|MSMTP_LOG_PATH|${MSMTP_LOG_PATH}|g" /etc/msmtprc
sudo sed -i "s|MSMTP_NOTIF_EMAIL_FROM|${MSMTP_NOTIF_EMAIL_FROM}|g" /etc/msmtprc
echo "/etc/msmtprc has been configured with the following settings: "
echo
cat /etc/msmtprc
echo
echo "Configuring msmtprc completed."
echo
# Run optional init scripts:
if [ -n "${OPT_INIT_SCRIPTS_DIR}" ] && [ -d "${OPT_INIT_SCRIPTS_DIR}" ]; then
for f in "${OPT_INIT_SCRIPTS_DIR}"/*.sh; do
[ -e "${f}" ] || continue
echo "Running custom init script: ${f}"
sudo chmod +x "${f}"
"${f}"
echo "\"${f}\" completed."
echo
done
fi
# Start runner:
if [ ! -f ".runner" ]; then
install-runner.sh
else
echo "Runner already installed, starting runner ... "
fi
exec ./run.sh