- Add publishing automated debian package releases via Cloudsmith.io, which allows evcc to be installed and updated via `apt` - Add nightly docker (:latest) and deb distribution - Disable docker builds for every commit on master - Allow nightly builds to be triggered manually
26 lines
No EOL
1,004 B
Bash
26 lines
No EOL
1,004 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
|
|
# This will only remove masks created by d-s-h on package removal.
|
|
deb-systemd-helper unmask evcc.service >/dev/null || true
|
|
|
|
# was-enabled defaults to true, so new installations run enable.
|
|
if deb-systemd-helper --quiet was-enabled evcc.service; then
|
|
# Enables the unit on first installation, creates new
|
|
# symlinks on upgrades if the unit file has changed.
|
|
deb-systemd-helper enable evcc.service >/dev/null || true
|
|
else
|
|
# Update the statefile to add new symlinks (if any), which need to be
|
|
# cleaned up on purge. Also remove old symlinks.
|
|
deb-systemd-helper update-state evcc.service >/dev/null || true
|
|
fi
|
|
|
|
# Restart only if it was already started
|
|
if [ -d /run/systemd/system ]; then
|
|
systemctl --system daemon-reload >/dev/null || true
|
|
if [ -n "$2" ]; then
|
|
deb-systemd-invoke try-restart evcc.service >/dev/null || true
|
|
fi
|
|
fi
|
|
fi |