Add the service files to run bt-stack-down*.sh via file activation
[platform/core/connectivity/bluetooth-tools.git] / packaging / bluetooth-tools.spec
index 8953f8e..79ccf1e 100644 (file)
@@ -103,6 +103,9 @@ install -D -m 0644 packaging/bluez-start.path %{buildroot}%{_libdir}/systemd/sys
 install -D -m 0644 packaging/bluetooth-share-start.service %{buildroot}%{_libdir}/systemd/system/bluetooth-share-start.service
 install -D -m 0644 packaging/bluetooth-share-start.path %{buildroot}%{_libdir}/systemd/system/bluetooth-share-start.path
 
+install -D -m 0644 packaging/bluetooth-stack-down.service %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.service
+install -D -m 0644 packaging/bluetooth-stack-down.path %{buildroot}%{_libdir}/systemd/system/bluetooth-stack-down.path
+
 install -D -m 0644 packaging/bluetooth-force-hci-logger.service %{buildroot}%{_libdir}/systemd/system/bluetooth-force-hci-logger.service
 install -D -m 0644 packaging/bluetooth-hci-dump@.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hci-dump@.service
 
@@ -125,6 +128,10 @@ ln -sf %{_libdir}/systemd/system/bluetooth-share-start.service %{_sysconfdir}/sy
 ln -sf %{_libdir}/systemd/system/bluetooth-share-start.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-share-start.path
 ln -sf %{_libdir}/systemd/system/bluetooth-share-start.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
+ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-stack-down.path
+ln -sf %{_libdir}/systemd/system/bluetooth-stack-down.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
 ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
 
@@ -153,6 +160,8 @@ ln -sf %{_libdir}/systemd/system/bluetooth-force-hci-logger.service %{_sysconfdi
 %{_libdir}/systemd/system/bluetooth-share-start.path
 %{_libdir}/systemd/system/bluetooth-force-hci-logger.service
 %{_libdir}/systemd/system/bluetooth-hci-dump@.service
+%{_libdir}/systemd/system/bluetooth-stack-down.service
+%{_libdir}/systemd/system/bluetooth-stack-down.path
 
 %post profile_common
 pushd %{_prefix}/etc/bluetooth/