Revert "Updated service to automatically restart. Adjusted documentation."

This reverts commit 3b54cd98d7.
gutenberg1
Marshall 2020-03-11 14:06:19 -04:00
parent 3b54cd98d7
commit e9959c4148
2 changed files with 5 additions and 16 deletions

View File

@ -8,15 +8,7 @@ Type=simple
RuntimeDirectory=autocat
WorkingDirectory=/var/lib/autocat/autocat3
ExecStartPre=-/usr/bin/mkdir -p /var/run/autocat
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
ExecStart=/var/lib/autocat/.local/bin/pipenv run python CherryPyApp.py
[Install]
WantedBy=multi-user.target

View File

@ -67,9 +67,6 @@ sudo touch /var/run/autocat/autocat3.pid
# Better to set the group name as pgweb for /var/run/autocat
sudo chown -R autocat:pgweb /var/run/autocat
#####
##### To install or update the autocat3 service
#####
sudo systemctl enable /var/lib/autocat/autocat3/autocat3.service
sudo systemctl start autocat3
@ -77,10 +74,10 @@ sudo systemctl start autocat3
# it might be due to monit (the monitoring system) fighting to restart. Or it might be that the
# service is in an uncertain state, not stopped. Try:
sudo service autocat3 stop
sudo systemctl disable autocat3.service
sudo systemctl enable /var/lib/autocat/autocat3/autocat3.service
sudo systemctl restart autocat3.service
sudo systemctl status autocat3.service
systemctl disable autocat3.service
systemctl enable /var/lib/autocat/autocat3/autocat3.service
systemctl restart autocat3.service
systemctl status autocat3.service
# `sudo rm /etc/systemd/system/autocat3.service` is probably not needed. As of July 20 2019,
# we are having problems with monit trying to restart. It might be necessary to also stop