Application du même code couleur aux scripts de runit
This commit is contained in:
parent
9133564455
commit
3f5e022339
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. /etc/service/template
|
. /etc/service/template
|
||||||
|
|
||||||
msglog "Starting Cron..."
|
msglog green "Starting Cron..."
|
||||||
# Touch cron files to fix 'NUMBER OF HARD LINKS > 1' issue. See https://github.com/phusion/baseimage-docker/issues/198
|
# 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/*
|
touch -c /etc/crontab /etc/cron.*/* /var/spool/cron/crontabs/*
|
||||||
exec /usr/sbin/cron -f
|
exec /usr/sbin/cron -f
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. /etc/service/template
|
. /etc/service/template
|
||||||
|
|
||||||
msglog "Starting Apache..."
|
msglog green "Starting Apache..."
|
||||||
exec apache2-foreground
|
exec apache2-foreground
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. /etc/service/template
|
. /etc/service/template
|
||||||
|
|
||||||
msglog "Starting glpi_init.sh..."
|
msglog green "Starting glpi_init.sh..."
|
||||||
/root/glpi_init.sh
|
/root/glpi_init.sh
|
||||||
sleep infinity
|
sleep infinity
|
||||||
|
@ -1,7 +1,19 @@
|
|||||||
NORMAL='\e[39m'
|
NORMAL='\e[39m'
|
||||||
RED='\e[31m'
|
RED='\e[31m'
|
||||||
|
GREEN='\e[32m'
|
||||||
|
|
||||||
msglog() {
|
msglog() {
|
||||||
|
case "${1}" in
|
||||||
|
green)
|
||||||
|
TEXT_COLOR="${GREEN}"
|
||||||
|
;;
|
||||||
|
red)
|
||||||
|
TEXT_COLOR="${RED}"
|
||||||
|
;;
|
||||||
|
normal)
|
||||||
|
TEXT_COLOR="${NORMAL}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
DATE=$(date '+%Y %b %d %H:%M:%S')
|
DATE=$(date '+%Y %b %d %H:%M:%S')
|
||||||
echo ${DATE} ${RED}${@}${NORMAL}
|
echo ${DATE} ${TEXT_COLOR}${2}${NORMAL}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user