File: debci-worker.postinst

package info (click to toggle)
debci 3.13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,656 kB
  • sloc: ruby: 6,516; sh: 2,437; javascript: 100; makefile: 92; perl: 11
file content (20 lines) | stat: -rw-r--r-- 468 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

if [ "$1" = configure ] && [ -z "$2" ]; then
  # build testbed immediately on first install
  echo "Building testbeds in background ..."
  debci update-worker --quiet &

  if [ -d /run/systemd/system ]; then
    # enable && start first instance
    systemctl enable debci-worker@1.service

    # tell systemd to reload
    systemctl --system daemon-reload >/dev/null || true
  fi
  deb-systemd-invoke start  debci-worker@1.service
fi

##DEBHELPER##