Commit acd2a24c authored by Héctor Orón Martínez's avatar Héctor Orón Martínez

Merge branch 'enable-obsservice' into 'debian/master'

Enable obsservice daemon

See merge request !14
parents 37fd892f 69a2d30b
......@@ -12,6 +12,15 @@ if ! getent passwd obsrun > /dev/null; then
usermod -c "User for build service backend" obsrun
fi
if ! getent passwd obsservicerun > /dev/null; then
adduser --system --quiet \
--ingroup obsrun --shell /bin/false \
--home /usr/lib/obs --no-create-home \
--shell /bin/false obsservicerun
usermod -c "User for build service source service" obsservicerun
fi
install -g obsrun -o obsservicerun -m0775 -d /srv/obs/run
install -g obsrun -o obsrun -d /srv/obs/repos
# Start up schedulers
......
......@@ -12,9 +12,17 @@ if [ "$1" = "purge" ]; then
rmdir /srv/obs 2>/dev/null || true
# Delete obs users and group
deluser --system --quiet obsrun
if getent group obsrun >/dev/null; then
delgroup --system --quiet obsrun
for USERNAME in obsservicerun obsrun; do
if [ -x "$(command -v deluser)" ]; then
deluser --quiet --system $USERNAME > /dev/null || true
else
echo >&2 "not removing $USERNAME system account because deluser command was not found"
fi
done
if [ -x "$(command -v delgroup)" ]; then
delgroup --quiet --system obsrun > /dev/null || true
else
echo >&2 "not removing obsrun system group because delgroup command was not found"
fi
fi
......
......@@ -82,6 +82,7 @@ override_dh_systemd_enable:
obswarden.service \
obsdodup.service \
obspublisher.service \
obsservice.service \
obssigner.service
dh_systemd_enable -p obs-api obsapidelayed.service
......@@ -98,6 +99,7 @@ override_dh_systemd_start:
obswarden.service \
obsdodup.service \
obspublisher.service \
obsservice.service \
obssigner.service
dh_systemd_start -p obs-api obsapidelayed.service
......
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