I have a script that I need to run as a certain user at boot time.
The script does work using
%sudo -u user myscript
However if I run the script at boot time -my creating an entry in
the /Library/Startup items I get a permissions error in my system log.
#!/bin/sh
case "$1" in
start)
if [ -d /usr/local/bb ]; then
sudo -u meanbb /usr/local/bb/runbb.sh start
fi
;;
stop)
if [ -d /usr/local/bb ]; then
sudo -u meanbb /usr/local/bb/runbb.sh stop
fi
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
Any hints will be appreciated.
--
"It is the unknown that defines our existence. We are constantly
searching not
just for answers to our questions but for new questions."
Benjamin Sisko