diff --git a/rpm/bt-tether.spec.gen b/rpm/bt-tether.spec.gen index 8e13dd2..ba87c9c 100755 --- a/rpm/bt-tether.spec.gen +++ b/rpm/bt-tether.spec.gen @@ -39,17 +39,19 @@ cp src/dns-relay %{buildroot}/usr/local/lib/bt-tether if [ 2 = "\$1" ]; then if [ -f /etc/systemd/system/bt-tether.service ]; then systemctl stop bt-tether.service + systemctl disable bt-tether.service + /usr/local/lib/bt-tether/bluetooth-config uninstall else systemctl stop bt-tether-daemon.service + systemctl disable bt-tether-daemon.service + /usr/local/lib/bt-tether/bt-config uninstall fi fi %post -if [ 1 = "\$1" -o -f /etc/systemd/system/bt-tether.service ]; then - /usr/local/lib/bt-tether/bt-config install - systemctl restart bluetooth.service - systemctl enable bt-tether-daemon.service -fi +/usr/local/lib/bt-tether/bt-config install +systemctl restart bluetooth.service +systemctl enable bt-tether-daemon.service systemctl start bt-tether-daemon.service %preun @@ -60,5 +62,7 @@ if [ 0 = "\$1" ]; then systemctl restart bluetooth.service fi +%postun + __EOF__