permissions

This commit is contained in:
j 2015-03-20 14:58:03 +05:30
parent cc6f04148a
commit 2aa86e2d56
3 changed files with 11 additions and 4 deletions

View file

@ -26,5 +26,5 @@ sudo vmbuilder $hypervisor ubuntu --suite=trusty \
--pass $password \ --pass $password \
--addpkg linux-image-generic \ --addpkg linux-image-generic \
--components main,universe,multiverse \ --components main,universe,multiverse \
--firstboot=$base/pandora_install.sh \ --firstboot=$base/firstboot.sh \
$extra $extra

7
vm/firstboot.sh Executable file
View file

@ -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

View file

@ -115,13 +115,13 @@ EOF
MANAGE="sudo -H -u pandora /srv/pandora/pandora/manage.py" MANAGE="sudo -H -u pandora /srv/pandora/pandora/manage.py"
mkdir /srv/pandora/data
chown -R pandora:pandora /srv/pandora
cd /srv/pandora/pandora cd /srv/pandora/pandora
$MANAGE init_db $MANAGE init_db
echo "UPDATE django_site SET domain = '$HOST.local', name = '$HOST.local' WHERE 1=1;" | $MANAGE dbshell 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 /srv/pandora/ctl install
if [ "$LXC" == "yes" ]; then if [ "$LXC" == "yes" ]; then