diff --git a/vm/build.sh b/vm/build.sh index 6b23eef6..eb18bb8f 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 00000000..9df6cfd5 --- /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 2608f125..efbb7bcf 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