1
0
linux/debian/hyperv-daemons.postinst
Konstantin Demin eb2bdc81cb rewrite scripts
try to provide better syntax and avoid using bash
2024-10-29 05:12:06 +03:00

26 lines
496 B
Bash

#!/bin/sh
set -e
have_systemd=1
[ -d /run/systemd/system ] || have_systemd=0
case "$1" in
configure )
if [ ${have_systemd} = 1 ] ; then
if [ -z "$2" ] ; then
# On initial install make sure udev notifies systemd
udevadm trigger || true
else
# On upgrade make sure running daemons are restarted
systemctl try-restart hv-kvp-daemon.service hv-vss-daemon.service
fi
fi
;;
esac
unset have_systemd
#DEBHELPER#
exit 0