rc/rc.multi
2024-07-19 21:01:30 +02:00

38 lines
806 B
Bash
Executable File

#!/bin/bash
#
# /etc/rc.multi: multi-user startup script
#
# Load configuration
. /etc/rc.conf
# Load functions
. /etc/rc.functions
# Run fixes startup file
if [ -x /etc/rc.fix ]; then
/etc/rc.fix
fi
# Start services
if [ "$SYSLOG" ] || [ "${SERVICES[*]}" ]; then
printf "$(BOLD "Starting services:")"
if [ -f /etc/rc.d/$SYSLOG ] && [ -x /etc/rc.d/$SYSLOG ]; then
printf " %s" "$SYSLOG"
/etc/rc.d/$SYSLOG start &> /dev/null || printf "$(BOLD "$(RED "[ERROR]")")"
fi
for service in "${SERVICES[@]}"; do
printf " %s" "$service"
/etc/rc.d/"$service" start &> /tmp/rc.$$ || printf "$(BOLD "$(RED "[ERROR]")")"
/usr/bin/logger -t "$service" -f /tmp/rc.$$
/bin/rm -f /tmp/rc.$$
done
printf "\n"
fi
# Run local startup script
if [ -x /etc/rc.local ]; then
/etc/rc.local
fi
# End of file