File init.sh of Package serviced
set -ex
echo " /var/lib/docker/** r," >> /etc/apparmor.d/local/usr.share.openqa.script.openqa
echo " /usr/share/openqa/assets/** rw," >> /etc/apparmor.d/local/usr.share.openqa.script.openqa
echo " /var/run/postgresql/.s.PGSQL.5432 rw," >> /etc/apparmor.d/local/usr.share.openqa.script.openqa
sed -i "s,/usr/share/openqa/script/openqa {,/usr/share/openqa/script/openqa flags=(attach_disconnected) {," /etc/apparmor.d/usr.share.openqa.script.openqa
sed -i "/\[Service\]/a Environment=MOJO_LISTEN=http://*:9526" /usr/lib/systemd/system/openqa-webui.service
systemctl daemon-reload
rcapparmor restart
# setup webserver and fake-auth
bash -ex /usr/share/openqa/script/configure-web-proxy
sed -i -e 's/#*.*method.*=.*$/method = Fake/' /etc/openqa/openqa.ini
service postgresql start
su postgres -c "createuser -D $dbuser" || :
su postgres -c "createdb -O $dbuser $dbname" || :
service openqa-webui start