# Set the WorkingDirectory, Environment and ExecStart values to match your environment. # If using Debian/*buntu, mkdir and chown are located in /bin/mkdir and /bin/chown, respectively. # If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively. [Unit] Description=Mediagoblin [Service] Type=forking User=mediagoblin Group=mediagoblin Environment=CELERY_ALWAYS_EAGER=false WorkingDirectory={{ mediagoblin_basedir }}/src # Start mg-paster process as root, then switch to mediagoblin user/group PermissionsStartOnly=true ExecStartPre=-/bin/mkdir -p /run/mediagoblin ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin ExecStart={{ mediagoblin_basedir }}/src/bin/paster serve \ {{ mediagoblin_basedir }}/src/paste_local.ini \ --pid-file=/var/run/mediagoblin/mediagoblin.pid \ --log-file=/var/log/mediagoblin/mediagoblin.log \ --daemon \ --server-name=http http_host=127.0.0.1 http_port=26543 #--server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543 ExecStop={{ mediagoblin_basedir }}/src/bin/paster serve \ --pid-file=/var/run/mediagoblin/mediagoblin.pid \ {{ mediagoblin_basedir }}/src/paste_local.ini stop PIDFile=/var/run/mediagoblin/mediagoblin.pid [Install] WantedBy=multi-user.target