ckb-next/debian/postinst

23 lines
451 B
Plaintext
Raw Permalink Normal View History

2025-02-10 18:47:52 +00:00
#!/bin/bash
. /usr/share/debconf/confmodule
if [[ $1 == "configure" ]]; then
systemctl unmask ckb-next-daemon.service
systemctl enable ckb-next-daemon.service
fi
OLDPID=$(pidof ckb-next)
if [[ -n "$OLDPID" ]]; then
killall -HUP ckb-next 2>/dev/null
sleep 6
NEWPID=$(pidof ckb-next)
if [[ "$OLDPID" == "$NEWPID" ]]; then
killall -9 ckb-next 2>/dev/null
fi
fi
systemctl start ckb-next-daemon.service
#DEBHELPER#