build(striker-ui-api): add API as systemd service

main
Tsu-ba-me 3 years ago
parent 8a2b96bffa
commit 5478f187b0
  1. 2
      anvil.spec.in
  2. 3
      units/Makefile.am
  3. 16
      units/striker-ui-api.service

@ -241,6 +241,8 @@ systemctl enable anvil-daemon.service
systemctl restart anvil-daemon.service
systemctl enable scancore.service
systemctl restart scancore.service
systemctl enable striker-ui-api.service
systemctl restart striker-ui-api.service
%post striker

@ -3,4 +3,5 @@ MAINTAINERCLEANFILES = Makefile.in
servicedir = $(SYSTEMD_UNIT_DIR)
dist_service_DATA = \
anvil-daemon.service \
scancore.service
scancore.service \
striker-ui-api.service

@ -0,0 +1,16 @@
[Unit]
Description=Anvil! Intelligent Availability Platform - Striker UI API
Wants=network.target
[Service]
Type=simple
# Run as apache to allow the API to access apache-owned locations; i.e., /mnt/shared.
User=apache
Group=apache
ExecStart=/usr/sbin/striker-ui-api
ExecStop=/bin/kill -WINCH ${MAINPID}
Restart=always
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save