How to properly configure systemctl service with gun?
I have a Django project that I am running with a cannon.
My manage.py file is in /home/Projects/myproject/myproject
.
My virtualenv is in /home/myproject
.
In /lib/systemd/system
I created a file myproject.service
:
[Unit]
Description=My Project
After=network.target
[Service]
User=my_user
Group=my_group
WorkingDirectory=/home/Projects/myproject/myproject
ExecStart= ???
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
I want to know how to properly configure my service file so that it can run my command to start the machine gun server on server restart, crash, etc.
+3
source to share
No one has answered this question yet
Check out similar questions: