Skip to content

Commit

Permalink
improve install script
Browse files Browse the repository at this point in the history
  • Loading branch information
remjey committed Mar 10, 2020
1 parent b335e62 commit a13db3d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions rpm/bt-tether.spec.gen
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -60,5 +62,7 @@ if [ 0 = "\$1" ]; then
systemctl restart bluetooth.service
fi
%postun
__EOF__

0 comments on commit a13db3d

Please sign in to comment.