Files
Raspberry-Pi-Bluetooth/raspi-bluetooth/DEBIAN/postinst
Cantibra c372b643a2
All checks were successful
Raspberry Pi Bluetooth / Raspberry Pi Bluetooth (arm64, bookworm, main) (push) Successful in 11s
Initialize Git Repository: 'Raspberry-Pi-Bluetooth'
2026-03-19 14:16:15 +01:00

37 lines
1.0 KiB
Bash

#!/usr/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
configure)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper unmask 'hciuart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/deb-systemd-helper --quiet was-enabled 'hciuart.service'; then
/usr/bin/deb-systemd-helper enable 'hciuart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
else
/usr/bin/deb-systemd-helper update-state 'hciuart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if [ -x '/usr/bin/deb-systemd-invoke' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
if [ -n "${2}" ]; then
_dh_action='restart'
else
_dh_action='start'
fi
/usr/bin/deb-systemd-invoke "${_dh_action}" 'hciuart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
esac