-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmediagoblin-celeryd.service
25 lines (22 loc) · 1.09 KB
/
mediagoblin-celeryd.service
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
# Set the WorkingDirectory, Environment and ExecStart values to match your environment.
# If using Debian/Ubuntu, mkdir and chown are located in /bin/mkdir and /bin/chown, respectively.
# If using Fedora/CehtOS/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=/srv/mediagoblin.example.org/mediagoblin
# Create directory for PID (if needed) and set ownership
ExecStartPre=/usr/bin/mkdir -p /run/mediagoblin
ExecStartPre=/usr/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
# Celery process will run as the `mediagoblin` user ater start.
Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin.example.org/mediagoblin/mediagoblin_local.ini \
CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery
ExecStart=/srv/mediagoblin.example.org/mediagoblin/bin/celery worker \
--logfile=/var/log/mediagoblin/celery.log \
--loglevel=INFO
PIDFile=/run/mediagoblin/mediagoblin-celeryd.pid
[Install]
WantedBy=multi-user.target