Systemd service file.

pull/7/head 1.3
Ferry Boender 8 years ago
parent adf3f627ce
commit e0340776ca
  1. 1
      Makefile
  2. 12
      README.md
  3. 14
      contrib/scriptform.service

@ -63,6 +63,7 @@ release_deb: release_src doc
cp contrib/scriptform.init.d_debian rel_deb/usr/share/doc/$(PROG) cp contrib/scriptform.init.d_debian rel_deb/usr/share/doc/$(PROG)
cp contrib/scriptform.init.d_redhat rel_deb/usr/share/doc/$(PROG) cp contrib/scriptform.init.d_redhat rel_deb/usr/share/doc/$(PROG)
cp contrib/scriptform.service rel_deb/usr/share/doc/$(PROG)
cp -ar contrib/debian/DEBIAN rel_deb/ cp -ar contrib/debian/DEBIAN rel_deb/
# Bump version numbers # Bump version numbers

@ -181,6 +181,18 @@ For **RedHat / Centos** systems:
Then edit `/etc/init.d/scriptform` and change the `FORM_CONFIG` setting to Then edit `/etc/init.d/scriptform` and change the `FORM_CONFIG` setting to
point at the form configuration JSON file you'd like to use. point at the form configuration JSON file you'd like to use.
There's also a **Systemd** unit file, which should work on most systems that
run on systemd:
sudo cp /usr/share/doc/scriptform/scriptform.service /etc/systemd/system/
Then edit `/etc/systemd/system/scriptform.service` and make change the
`FORM_CONFIG` environment variable to point at the form configuration JSON
file you'd like to use.
## Usage ## Usage
Usage: Usage:

@ -0,0 +1,14 @@
[Unit]
Description=Scriptform
After=network.target
[Service]
Environment=FORM_CONFIG=/home/fboender/Projects/fboender/scriptform/examples/megacorp_acc/megacorp_acc.json
Environment=LOG_FILE=/var/log/scriptform.log
Environment=PORT=8081
ExecStart=/usr/bin/scriptform --pid-file=/var/run/scriptform.pid --port=${PORT} --log-file=${LOG_FILE} ${FORM_CONFIG}
Type=forking
PIDFile=/var/run/scriptform.pid
[Install]
WantedBy=default.target
Loading…
Cancel
Save