Created
June 7, 2016 20:58
-
-
Save enko/2eb67b82d0dd3422ca33e37c7b62941a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A systemd service definition for partuniverse | |
# | |
[Unit] | |
Description=partuniverse service definition | |
Requires=nginx.service partuniverse.socket | |
Before=nginx.service | |
After=network.target | |
[Service] | |
PIDFile=/run/partuniverse/pid | |
User=partuniverse | |
Group=partuniverse | |
WorkingDirectory=/home/partuniverse/partuniverse/partuniverse | |
ExecStart=/home/partuniverse/partuniverse/partuniverse/bin/gunicorn --pid /run/partuniverse/pid partuniverse.wsgi:application --bind 127.0.0.1:8005 | |
ExecReload=/bin/kill -s HUP $MAINPID | |
ExecStop=/bin/kill -s TERM $MAINPID | |
PermissionsStartOnly=true | |
ExecStartPre=-/bin/mkdir /run/partuniverse | |
ExecStartPre=/bin/chown -R partuniverse:partuniverse /run/partuniverse | |
[Install] | |
# When should this service be triggered? (this is the equivalent of SysV's runlevel 3) | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment