/etc/init/maas-region-celery.conf is in maas-region-controller-min 1.5.4+bzr2294-0ubuntu1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 27 | # maas-celery - celery daemon for the region controller
#
# MAAS Region Controller Celery Daemon
description "MAAS"
author "Raphael Badin <raphael.badin@canonical.com>"
start on filesystem and net-device-up and rabbitmq-server-running
stop on runlevel [016]
respawn
env workers_user="maas_workers"
env workers_pass=""
env workers_vhost="/maas_workers"
env DJANGO_SETTINGS_MODULE="maas.settings"
pre-start script
if [ -f /usr/sbin/rabbitmqctl ] && ! /usr/sbin/rabbitmqctl list_user_permissions "$workers_user" 1>/dev/null 2>&1; then
workers_pass=`grep "maas_workers" /etc/maas/maas_local_celeryconfig.py | cut -d':' -f3 | cut -d'@' -f1`
/usr/sbin/rabbitmqctl add_user "$workers_user" "$workers_pass"
/usr/sbin/rabbitmqctl add_vhost "$workers_vhost"
/usr/sbin/rabbitmqctl set_permissions -p "$workers_vhost" "$workers_user" ".*" ".*" ".*"
fi
end script
exec /usr/sbin/maas-region-celeryd --logfile=/var/log/maas/celery-region.log --schedule=/var/lib/maas/celerybeat-region-schedule --user=maas --group=maas
|