Commit 68a70d11 by Czémán Arnold

openbsd: move to virtualenv

parent 3a730e62
...@@ -4,14 +4,6 @@ ...@@ -4,14 +4,6 @@
pkg_add -z `cat bootstrap/openbsd/pkg-requirements.txt` pkg_add -z `cat bootstrap/openbsd/pkg-requirements.txt`
# Necessary symlinks
ln -sf /usr/local/bin/pip2.7 /usr/local/bin/pip
#ln -sf /usr/local/bin/python2.7 /usr/local/bin/python
#ln -sf /usr/local/bin/python2.7-2to3 /usr/local/bin/2to3
#ln -sf /usr/local/bin/python2.7-config /usr/local/bin/python-config
#ln -sf /usr/local/bin/pydoc2.7 /usr/local/bin/pydoc
grep "^cloud:" /etc/passwd > /dev/null grep "^cloud:" /etc/passwd > /dev/null
ret=$? ret=$?
if [ $ret -ne 0 ] if [ $ret -ne 0 ]
...@@ -32,6 +24,11 @@ then ...@@ -32,6 +24,11 @@ then
git clone https://git.ik.bme.hu/circle/agent.git agent git clone https://git.ik.bme.hu/circle/agent.git agent
fi fi
python2 -m virtualenv /usr/local/virtualenvs/agent
. /usr/local/virtualenv/agent/bin/activate
pip install -r /root/requirements.txt
deactivate
cp bootstrap/openbsd/usr/sbin/mount_circle-userstore /usr/sbin/mount_circle-userstore cp bootstrap/openbsd/usr/sbin/mount_circle-userstore /usr/sbin/mount_circle-userstore
cp bootstrap/openbsd/rc.d/agent /etc/rc.d/agent cp bootstrap/openbsd/rc.d/agent /etc/rc.d/agent
......
...@@ -2,8 +2,12 @@ ...@@ -2,8 +2,12 @@
# #
# $OpenBSD: agent $ # $OpenBSD: agent $
daemon="/usr/local/bin/python2.7 /root/agent/agent.py" daemon=". /usr/local/virtualenvs/agent/bin/activate ; python2 /root/agent/agent.py"
daemon_timeout=180
. /etc/rc.d/rc.subr . /etc/rc.d/rc.subr
rc_bg=YES
rc_reload=NO
rc_cmd $1 rc_cmd $1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment