I'm running Zope 2.5.1p1 (and CMF) on OpenBSD 3.1. It runs in separated mode, so Zope sits in /usr/local/lib/zope, while the Zope instance runs under a normal user in /home/zope with the database in /home/zope/var and the start script as: export INSTANCE_HOME=/home/zope export PYTHONHOME=/usr/local/lib/zope exec /usr/local/bin/python2.1 -O $PYTHONHOME/z2.py -D "$0" -p /home/zope/Zope.cgi (the exec statement is one line). All good, but I want to have zope autostart as the normal user (not root) by using /etc/rc.local. I have this in rc.local # Run zope if [ -x /usr/local/bin/python2.1 ]; then echo -n ' zope'; /home/zope/start fi But I think this doesn't work, and would start as root. Advice? Thanks, *************************** * Adam Getchell AdamG@hrrm.ucdavis.edu * System Architect/Programmer (530) 752-1584 * Human Resources Information Systems http://www.hr.ucdavis.edu/ *************************** "Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu
Try something like this in the rc script: su - zope -c "/home/zope/start" HTH, - C On Tue, 2002-10-08 at 13:57, Adam Getchell wrote:
I'm running Zope 2.5.1p1 (and CMF) on OpenBSD 3.1. It runs in separated mode, so Zope sits in /usr/local/lib/zope, while the Zope instance runs under a normal user in /home/zope with the database in /home/zope/var and the start script as:
export INSTANCE_HOME=/home/zope export PYTHONHOME=/usr/local/lib/zope exec /usr/local/bin/python2.1 -O $PYTHONHOME/z2.py -D "$0" -p /home/zope/Zope.cgi
(the exec statement is one line).
All good, but I want to have zope autostart as the normal user (not root) by using /etc/rc.local.
I have this in rc.local
# Run zope if [ -x /usr/local/bin/python2.1 ]; then echo -n ' zope'; /home/zope/start fi
But I think this doesn't work, and would start as root.
Advice?
Thanks,
*************************** * Adam Getchell AdamG@hrrm.ucdavis.edu * System Architect/Programmer (530) 752-1584 * Human Resources Information Systems http://www.hr.ucdavis.edu/ *************************** "Invincibility is in oneself, vulnerability in the opponent." -- Sun Tzu
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Adam Getchell -
Chris McDonough