Commit 5d17d585 authored by Lucas Kanashiro's avatar Lucas Kanashiro

Tweak obs-api.postinst to support new systemd unit files

These modifications are needed to successfully start the services
when obs-api is installed.
parent 4ef40310
......@@ -11,6 +11,15 @@ if ! getent passwd obsapi > /dev/null; then
usermod -c "User for build service api/webui" obsapi
# regenerate Gemfile.lock
rm -f /usr/share/obs/api/Gemfile.lock
cd /usr/share/obs/api
# previous bundle config does not allow one to regenerate the Gemfile.lock
rm -f .bundle/config || true
bundle --local --quiet
cd - >/dev/null
chown www-data:www-data /usr/share/obs/api/Gemfile.lock
# Place api and repo url on index page
if [ ! -f /usr/share/obs/overview/index.html ] ; then
FQHOSTNAME=`hostname -f` || FQHOSTNAME=obs-api
......@@ -50,6 +59,9 @@ fi
touch /var/log/obs/
touch /var/log/obs/clockworkd.clock.output
chown -R www-data:www-data /var/log/obs
chown -R www-data:www-data /var/cache/obs/tmp
# Config Database with dbconfig-common
. /usr/share/debconf/confmodule
. /usr/share/dbconfig-common/dpkg/postinst.mysql
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment