Skip to content

Instantly share code, notes, and snippets.

@HitScan
Created September 25, 2017 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HitScan/0ffde4a83682ce64e9aa4aa80e8c3d85 to your computer and use it in GitHub Desktop.
Save HitScan/0ffde4a83682ce64e9aa4aa80e8c3d85 to your computer and use it in GitHub Desktop.
Systemd files for OpenSRF / Clark Kent
[Unit]
Description=Evergreen Reporter
After=opensrf.service
BindsTo=opensrf.service
[Service]
User=opensrf
Group=opensrf
Type=forking
Environment=PATH=/openils/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ExecStartPre=/bin/sleep 2
ExecStart=/openils/bin/clark-kent.pl --daemon
ExecStopPost=/bin/rm /tmp/reporter-LOCK
[Install]
WantedBy=multi-user.target
[Unit]
Description=Open Service Request Framework
After=ejabberd.service memcached.service
Before=apache2.service apache2-ws.service
Requries=memcached.service
BindsTo=ejabberd.service
[Service]
User=opensrf
Group=opensrf
Type=oneshot
RemainAfterExit=yes
Environment=PATH=/openils/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#ExecStartPre=/bin/sleep 5
ExecStart=/openils/bin/osrf_control -l --start-all
#ExecStartPost=/bin/sleep 5
ExecStartPost=-/bin/systemctl -q restart apache2.service
ExecStartPost=-/bin/systemctl -q restart apache2-ws.service
ExecStop=/openils/bin/osrf_control -l --stop-all
[Install]
WantedBy=multi-user.target
Alias=opensrf.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment