Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596### Common setup for startup scripts.### Copyright 1998-2002 Apple Computer, Inc.##
######################## Configure the shell ########################
### Be strict###set -eset -u
### Set command search path##PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices; export PATH
### Set the terminal mode###if [ -x /usr/bin/tset ] && [ -f /usr/share/misc/termcap ]; then# TERM=$(tset - -Q); export TERM#fi
##################### Useful functions #####################
### Determine if the network is up by looking for any non-loopback# internet network interfaces.##CheckForNetwork(){ local test
if [ -z "${NETWORKUP:=}" ]; then test=$(ifconfig -a inet 2>/dev/null | sed -n -e '/127.0.0.1/d' -e '/0.0.0.0/d' -e '/inet/p' | wc -l) if [ "${test}" -gt 0 ]; then NETWORKUP="-YES-" else NETWORKUP="-NO-" fi fi}
alias ConsoleMessage=echo
### Process management##GetPID (){ local program="$1" local pidfile="${PIDFILE:=/var/run/${program}.pid}" local pid=""
if [ -f "${pidfile}" ]; then pid=$(head -1 "${pidfile}") if ! kill -0 "${pid}" 2> /dev/null; then echo "Bad pid file $pidfile; deleting." pid="" rm -f "${pidfile}" fi fi
if [ -n "${pid}" ]; then echo "${pid}" return 0 else return 1 fi}
### Generic action handler##RunService (){ case $1 in start ) StartService ;; stop ) StopService ;; restart) RestartService ;; * ) echo "$0: unknown argument: $1";; esac}
########################### Get host configuration ###########################. /etc/hostconfig