Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SystemStarteup Items



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



Jose Luis Paredes System Programmer I Yale University Office: (203) 432.6668 http://defiant.its.yale.edu



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Client-management mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/client-management/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.