Correction du bug cron
Ajout de couleurs dans les logs
This commit is contained in:
7
service/20-cron/run
Executable file
7
service/20-cron/run
Executable 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
5
service/30-apache2/run
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
. /etc/service/template
|
||||
|
||||
msglog "Starting Apache..."
|
||||
exec apache2-foreground
|
6
service/90-glpi_init/run
Executable file
6
service/90-glpi_init/run
Executable 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
7
service/template
Normal file
@ -0,0 +1,7 @@
|
||||
NORMAL='\e[39m'
|
||||
RED='\e[31m'
|
||||
|
||||
msglog() {
|
||||
DATE=$(date '+%Y %b %d %H:%M:%S')
|
||||
echo ${DATE} ${RED}${@}${NORMAL}
|
||||
}
|
Reference in New Issue
Block a user