blob: f44a0120930c6ba572a3473fa38b43ad7dab734c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# {{ ansible_managed }}
# 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 Celeryd
[Service]
User=mediagoblin
Group=mediagoblin
Type=simple
WorkingDirectory={{ mediagoblin_basedir }}/src
# Create directory for PID (if needed) and set ownership
ExecStartPre=/bin/mkdir -p /run/mediagoblin
ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
# Celery process will run as the `mediagoblin` user after start.
Environment=MEDIAGOBLIN_CONFIG={{ mediagoblin_basedir }}/src/mediagoblin_local.ini \
CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery
ExecStart={{ mediagoblin_basedir }}/src/bin/celery worker \
--logfile=/var/log/mediagoblin/celery.log \
--loglevel=INFO
PIDFile=/run/mediagoblin/mediagoblin-celeryd.pid
[Install]
WantedBy=multi-user.target
|