add systemd unit files

master
James Sigurðarson 2016-12-05 20:56:35 +00:00
parent 43a28bfddf
commit 409397056d
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,18 @@
[Unit]
Description=IceCTF platform
Requires=ctf-platform.socket
After=network.target
[Service]
PIDFile=/srv/run/ctf-platform/pid
User=deploy
Group=deploy
WorkingDirectory=/srv/ctf-platform/
ExecStart=/usr/local/bin/gunicorn --pid /srv/run/ctf-platform/pid app:app
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true
Environment=PRODUCTION=true
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,9 @@
[Unit]
Description=IceCTF platform socket
[Socket]
ListenStream=/srv/run/ctf-platform/socket
ListenStream=0.0.0.0:9002
[Install]
WantedBy=sockets.target