File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ ADD etc/lftp.conf /etc/lftp.conf
34
34
ADD etc/ssh/ssh_config.d/strict.conf /etc/ssh/ssh_config.d/strict.conf
35
35
COPY backup.sh backup-entrypoint.sh cron-foreground.sh /usr/local/bin/
36
36
37
+ # Create cronjob log file
38
+ RUN touch /var/log/cron
39
+ RUN ln -sf /proc/$$/fd/1 /var/log/cron
37
40
RUN echo "cron.* /dev/stdout" >> /etc/rsyslog.conf && rm -fr /etc/cron.* && mkdir /etc/cron.d
38
41
39
42
# CMD ["/bin/bash","/conf/doBackup.sh"]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ chown root:crontab $crontab
9
9
10
10
if [[ " $1 " =~ ^[0-9* ] ]]; then
11
11
while test $# -gt 0; do
12
- echo " $1 > /dev/stdout 2>&1" >> $crontab
12
+ echo " $1 > /var/log/cron 2>&1" >> $crontab
13
13
shift
14
14
done
15
15
set -- cron-foreground.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
set -e
3
3
4
- rsyslogd && true
4
+ rsyslogd
5
5
cron -f -L 15
6
6
7
- # tail -f /var/log/cron
You can’t perform that action at this time.
0 commit comments