This commit is contained in:
j 2015-03-15 01:04:54 +05:30
parent 8afe1257ac
commit 1e85b9d480

View file

@ -13,7 +13,7 @@ else
fi fi
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
echo "deb http://ppa.launchpad.net/j/pandora/ubuntu trusty main" > /etc/apt/sources.list.d/j-pandora.list echo "deb http://ppa.launchpad.net/j/pandora/ubuntu trusty main" > /etc/apt/sources.list.d/j-pandora.list
apt-key add - << EOF apt-key add - <<EOF
-----BEGIN PGP PUBLIC KEY BLOCK----- -----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1 Version: GnuPG v1
@ -95,7 +95,7 @@ SITE_CONFIG="/srv/pandora/pandora/config.jsonc"
test -e $HOST_CONFIG && cp $HOST_CONFIG $SITE_CONFIG test -e $HOST_CONFIG && cp $HOST_CONFIG $SITE_CONFIG
test -e $SITE_CONFIG || cp /srv/pandora/pandora/config.pandora.jsonc $SITE_CONFIG test -e $SITE_CONFIG || cp /srv/pandora/pandora/config.pandora.jsonc $SITE_CONFIG
cat > /srv/pandora/pandora/local_settings.py << EOF cat > /srv/pandora/pandora/local_settings.py <<EOF
DATABASES = { DATABASES = {
'default': { 'default': {
'NAME': 'pandora', 'NAME': 'pandora',
@ -117,7 +117,7 @@ MANAGE="sudo -H -u pandora python manage.py"
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 mkdir /srv/pandora/data
chown -R pandora:pandora /srv/pandora chown -R pandora:pandora /srv/pandora
@ -181,7 +181,7 @@ EOF
chmod +x /usr/local/bin/genissue chmod +x /usr/local/bin/genissue
/usr/local/bin/genissue > /etc/issue /usr/local/bin/genissue > /etc/issue
cat > /etc/rc.local << EOF cat > /etc/rc.local <<EOF
#!/bin/sh -e #!/bin/sh -e
#vm has one network interface and that might change, make sure its not persistent #vm has one network interface and that might change, make sure its not persistent
rm -f /etc/udev/rules.d/70-persistent-net.rules rm -f /etc/udev/rules.d/70-persistent-net.rules
@ -189,8 +189,9 @@ rm -f /etc/udev/rules.d/70-persistent-net.rules
#update issue #update issue
/usr/local/bin/genissue > /etc/issue /usr/local/bin/genissue > /etc/issue
EOF EOF
chmod +x /etc/rc.local chmod +x /etc/rc.local
fi
apt-get clean apt-get clean
cat > /home/pandora/.vimrc <<EOF cat > /home/pandora/.vimrc <<EOF