--- /dev/null
+[Unit]
+Description=Service to run bluetooth-share normally
+
+[Service]
+User=network_fw
+Group=network_fw
+Type=oneshot
+SmackProcessLabel=System
+SupplementaryGroups=priv_mediastorage priv_externalstorage
+ExecStartPre=/usr/bin/rm -f /run/.bluetooth_share_start
+ExecStart=/usr/bin/bluetooth-share
+RemainAfterExit=no
+SuccessExitStatus=1
+StartLimitInterval=1
+StartLimitBurst=10
install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_COMM_DATA}/%{name}/init_db.sh
install -D -m 0644 packaging/bluetooth-share.service %{buildroot}%{_libdir}/systemd/system/bluetooth-share.service
+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
mkdir -p %{buildroot}%{upgrade_script_path}
mkdir -p %{buildroot}%{upgrade_data_path}
%post
/sbin/ldconfig
%{TZ_COMM_DATA}/%{name}/init_db.sh
+mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+mkdir -p %{_libdir}/systemd/system/multi-user.target.wants/
ln -sf %{_libdir}/systemd/system/bluetooth-share.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-share-start.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-share-start.path %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+ln -sf %{_libdir}/systemd/system/bluetooth-share-start.path %{_sysconfdir}/systemd/system/multi-user.target.wants/
%post -n libbluetooth-share-devel -p /sbin/ldconfig
#%{_datadir}/dbus-1/system-services/org.bluetooth.share.service
%{TZ_COMM_DATA}/%{name}/init_db.sh
%{_libdir}/systemd/system/bluetooth-share.service
+%{_libdir}/systemd/system/bluetooth-share-start.service
+%{_libdir}/systemd/system/bluetooth-share-start.path
%{upgrade_script_path}/500.bluetooth-share_upgrade.sh
%{upgrade_data_path}/init_db.sh
%{_libdir}/libbt-share.so*
%exclude %{_libdir}/debug/*
%exclude %{_libdir}/debug/.build-id/*
-%endif
\ No newline at end of file
+%endif