-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example files for using with systemd
- Loading branch information
1 parent
1f890c9
commit 2a72a60
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Absolute or relative path to the 'celery' command: | ||
CELERY_BIN="/usr/bin/celery" | ||
CELERY_APP="proj" | ||
|
||
# Where to chdir at start. | ||
CELERYCAM_CHDIR="/opt/celery" | ||
|
||
# Extra arguments to celerycam | ||
CELERYCAM_OPTS="--camera django_celery_monitor.camera.Camera --frequency=2.0" | ||
|
||
CELERYCAM_LOG_FILE="/var/log/celery/celerycam.log" | ||
CELERYCAM_PID_FILE="/var/run/celery/celery_cam.pid" | ||
CELERYCAM_LOG_LEVEL="INFO" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[Unit] | ||
Description=Celery Camera Service | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=celery | ||
Group=celery | ||
EnvironmentFile=/etc/sysconfig/celerycam | ||
WorkingDirectory=/opt/celery | ||
ExecStart=/bin/sh -c '${CELERY_BIN} events -A ${CELERY_APP} \ | ||
--workdir=${CELERYCAM_CHDIR} \ | ||
--pidfile=${CELERYCAM_PID_FILE} \ | ||
--logfile=${CELERYCAM_LOG_FILE} \ | ||
--loglevel=${CELERYCAM_LOG_LEVEL} \ | ||
${CELERYCAM_OPTS}' | ||
ExecStop=/bin/systemctl kill celerycam.service | ||
|
||
[Install] | ||
WantedBy=multi-user.target |