From 2aa86e2d56420cb67abe528b4976d46f04c02b5e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 20 Mar 2015 14:58:03 +0530 Subject: [PATCH] permissions --- vm/build.sh | 2 +- vm/firstboot.sh | 7 +++++++ vm/pandora_install.sh | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100755 vm/firstboot.sh diff --git a/vm/build.sh b/vm/build.sh index 6b23eef64..eb18bb8f8 100755 --- a/vm/build.sh +++ b/vm/build.sh @@ -26,5 +26,5 @@ sudo vmbuilder $hypervisor ubuntu --suite=trusty \ --pass $password \ --addpkg linux-image-generic \ --components main,universe,multiverse \ - --firstboot=$base/pandora_install.sh \ + --firstboot=$base/firstboot.sh \ $extra diff --git a/vm/firstboot.sh b/vm/firstboot.sh new file mode 100755 index 000000000..9df6cfd53 --- /dev/null +++ b/vm/firstboot.sh @@ -0,0 +1,7 @@ +#!/bin/sh +apt-get update -q +apt-get install -y curl +curl https://wiki.0x2620.org/browser/pandora/vm/pandora_install.sh?format=txt > /root/pandora_install.sh +chmod 755 /root/pandora_install.sh +/root/pandora_install.sh >/root/pandora_install.log 2>&1 +rm /root/pandora_install.sh diff --git a/vm/pandora_install.sh b/vm/pandora_install.sh index 2608f1255..efbb7bcff 100755 --- a/vm/pandora_install.sh +++ b/vm/pandora_install.sh @@ -115,13 +115,13 @@ EOF MANAGE="sudo -H -u pandora /srv/pandora/pandora/manage.py" +mkdir /srv/pandora/data +chown -R pandora:pandora /srv/pandora + cd /srv/pandora/pandora $MANAGE init_db echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | $MANAGE dbshell -mkdir /srv/pandora/data -chown -R pandora:pandora /srv/pandora - /srv/pandora/ctl install if [ "$LXC" == "yes" ]; then