Improve service processing
This commit is contained in:
parent
07c463b238
commit
a084c2d811
1 changed files with 2 additions and 4 deletions
|
@ -91,18 +91,16 @@ rm /etc/systemd/system/%{name}-oneshot.service || true
|
|||
|
||||
# Install/update permission daemon (root)
|
||||
cp %{_datadir}/%{name}/service/%{name}-oneshot.service %{_unitdir}/%{name}-oneshot.service
|
||||
systemctl daemon-reload
|
||||
systemctl start %{name}-oneshot.service
|
||||
systemctl enable %{name}-oneshot.service
|
||||
|
||||
# Install/update background daemon (default user)
|
||||
cp %{_datadir}/%{name}/service/%{name}.service %{_userunitdir}/%{name}.service
|
||||
su $SFOSUSER -c "systemctl --user daemon-reload"
|
||||
su $SFOSUSER -c "systemctl --user start %{name}.service"
|
||||
su $SFOSUSER -c "systemctl --user enable %{name}.service"
|
||||
|
||||
# Cleanup
|
||||
systemctl daemon-reload
|
||||
systemctl reset-failed
|
||||
|
||||
|
||||
%postun
|
||||
# Figure out the default user name
|
||||
|
|
Loading…
Reference in a new issue