fix(striker-ui-api): relocate API resources during installation

main
Tsu-ba-me 3 years ago
parent a951ac3892
commit 409df04366
  1. 15
      striker-ui-api/Makefile.am
  2. 2
      units/striker-ui-api.service

@ -1,17 +1,6 @@
MAINTAINERCLEANFILES = Makefile.in
compressedapi = striker-ui-api.tar.xz
extractedapi = striker-ui-api
strikeruiapidir = $(datarootdir)/striker-ui-api
EXTRA_DIST = $(compressedapi)
dist_strikeruiapi_DATA = out/index.js
# Blank target; the compressed API executable should be usable as-is.
$(compressedapi): ;
install-data-hook:
-@echo "Extract the API executable."
tar -xvf $(srcdir)/$(compressedapi) -C $(DESTDIR)/$(sbindir)
uninstall-hook:
-@echo "Remove the API executable."
rm -f $(DESTDIR)/$(sbindir)/$(extractedapi)

@ -7,7 +7,7 @@ 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
ExecStart=/usr/sbin/nodejs /usr/share/striker-ui-api/index.js
ExecStop=/bin/kill -WINCH ${MAINPID}
Restart=always

Loading…
Cancel
Save