Files
Arquivotheca.Solaris-2.5/cmd/initpkg/init.d/syslog
seta75D 7c4988eac0 Init
2021-10-11 19:38:01 -03:00

30 lines
611 B
Plaintext
Executable File

#
# Copyright (c) 1991, by Sun Microsystems, Inc.
#
#ident "@(#)syslog 1.6 93/10/06 SMI"
case "$1" in
'start')
if [ -f /etc/syslog.conf -a -f /usr/sbin/syslogd ]; then
echo "syslog service starting."
if [ ! -f /var/adm/messages ]
then
cp /dev/null /var/adm/messages
fi
/usr/sbin/syslogd 1>/dev/console 2>&1
fi
;;
'stop')
[ ! -f /etc/syslog.pid ] && exit 0
syspid=`cat /etc/syslog.pid`
if [ "$syspid" -gt 0 ]; then
echo "Stopping the syslog service."
kill -15 $syspid 2>&1 | /usr/bin/grep -v "no such process"
fi
;;
*)
echo "Usage: /etc/init.d/syslog { start | stop }"
;;
esac
exit 0