From 0cee3c8d60f13796911595c4d4c8f9f695fd3061 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 8 Sep 2020 15:54:59 -0700 Subject: [PATCH] add systemd service file for relay --- xwords4/relay/relay.service | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 xwords4/relay/relay.service diff --git a/xwords4/relay/relay.service b/xwords4/relay/relay.service new file mode 100644 index 000000000..57f5097c8 --- /dev/null +++ b/xwords4/relay/relay.service @@ -0,0 +1,24 @@ +[Unit] +# specifies metadata and dependencies +Description=Start legacy CrossWords relay +After=postgresql.service + +StartLimitIntervalSec=500 +StartLimitBurst=5 + +[Service] +# Service specify the user and group under which our process will run. +User=relay + +WorkingDirectory=/home/relay/dev/git/xwords/xwords4/relay +ExecStart=/home/relay/dev/git/xwords/xwords4/relay/xwrelay -F -D + +# on-failure ignores SIGTERM and a couple of other signals making it +# harder to test. Not sure if there's downside to 'always' but that's +# what I'm using for now +# Restart=on-failure +Restart=always +RestartSec=5s + +[Install] +WantedBy=multi-user.target