declare -a switches=()
systemd_unit="$WORKSPACE/${src_path}/${prog}.service"
if [[ -e "${systemd_unit}" ]]; then
- switches+=("${systemd_unit}=/lib/systemd/system/${prog}.service")
- switches+=(--after-install "$WORKSPACE/build/go-package-scripts/postinst")
+ switches+=(
+ --after-install "$WORKSPACE/build/go-package-scripts/postinst"
+ --before-remove "$WORKSPACE/build/go-package-scripts/prerm"
+ "${systemd_unit}=/lib/systemd/system/${prog}.service")
fi
switches+=("$WORKSPACE/$license_file=/usr/share/doc/$prog/$license_file")