From 80754c50d9c5d77b2c7389cca736cc1ffba6fab4 Mon Sep 17 00:00:00 2001 From: autocat Date: Thu, 10 Oct 2019 12:36:41 -0400 Subject: [PATCH] autocat3.service changes --- autocat3.service | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/autocat3.service b/autocat3.service index 9adf218..80ae2aa 100644 --- a/autocat3.service +++ b/autocat3.service @@ -8,7 +8,15 @@ Type=simple RuntimeDirectory=autocat WorkingDirectory=/var/lib/autocat/autocat3 ExecStartPre=-/usr/bin/mkdir -p /var/run/autocat -ExecStart=/var/lib/autocat/.local/bin/pipenv run python CherryPyApp.py +ExecStart=/usr/local/bin/pipenv run python CherryPyApp.py +# +# These next lines are for auto-restart. See: man systemd.service +Type=simple +PIDFile=/var/run/autocat/autocat3.pid +RemainAfterExit=no +Restart=on-failure +RestartSec=5s +TimeStartSec=5s [Install] WantedBy=multi-user.target