Correction du bug cron

Ajout de couleurs dans les logs
This commit is contained in:
root
2020-08-06 16:20:43 +02:00
parent 65ed791507
commit 9133564455
6 changed files with 62 additions and 13 deletions

7
service/20-cron/run Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
. /etc/service/template
msglog "Starting Cron..."
# Touch cron files to fix 'NUMBER OF HARD LINKS > 1' issue. See https://github.com/phusion/baseimage-docker/issues/198
touch -c /etc/crontab /etc/cron.*/* /var/spool/cron/crontabs/*
exec /usr/sbin/cron -f

5
service/30-apache2/run Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
. /etc/service/template
msglog "Starting Apache..."
exec apache2-foreground

6
service/90-glpi_init/run Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
. /etc/service/template
msglog "Starting glpi_init.sh..."
/root/glpi_init.sh
sleep infinity

7
service/template Normal file
View File

@ -0,0 +1,7 @@
NORMAL='\e[39m'
RED='\e[31m'
msglog() {
DATE=$(date '+%Y %b %d %H:%M:%S')
echo ${DATE} ${RED}${@}${NORMAL}
}