#! /bin/sh -xe
+# wheezy
apt-key adv --fetch-keys http://scientific.zcu.cz/repos/jenkins-builder.asc
apt-key adv --fetch-keys http://scientific.zcu.cz/repos/valtri2.asc
cat << EOF > /etc/apt/sources.list.d/rocci-wheezy.list
deb-src http://scientific.zcu.cz/repos/rOCCI/debian/ wheezy/
EOF
-apt-get update
-apt-get install -y apache2-mpm-worker libapache2-mod-passenger
-apt-get install -y rocci-server
+if test -n "$FRESH_PASSENGER"; then
+ # squeeze, wheezy
+ # lucid, precise, raring, saucy
+ apt-get install -y apt-transport-https
+ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
+ cat <<EOF > /etc/apt/sources.list.d/passenger-wheezy.list
+deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
+deb-src https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
+EOF
+fi
-# if rocci-server is set-up before apache, these steps must be performed
-# manually:
-a2enmod ssl
-a2ensite occi-ssl
-service apache2 reload
+apt-get update
+apt-get install -y rocci-server-apache