~ubuntu-branches/ubuntu/precise/maas/precise-updates

« back to all changes in this revision

Viewing changes to debian/maas.maas-txlongpoll.upstart

Tags: 1.2+bzr1373+dfsg-0ubuntu1~12.04.4
* SECURITY UPDATE: failure to authenticate downloaded content (LP: #1039513)
  - debian/patches/CVE-2013-1058.patch: Authenticate downloaded files with
    GnuPG and MD5SUM files. Thanks to Julian Edwards.
  - CVE-2013-1058
* SECURITY UPDATE: configuration options may be loaded from current working
  directory (LP: #1158425)
  - debian/patches/CVE-2013-1057-1-2.patch: Do not load configuration
    options from the current working directory. Thanks to Julian Edwards.
  - CVE-2013-1057

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# maas - txlongpoll service
2
 
#
3
 
# MAAS Provisioning Service txlongpoll
4
 
 
5
 
description     "MAAS txlongpoll"
6
 
author "Andres Rodriguez <andres.rodriguez@canonical.com>"
7
 
 
8
 
start on filesystem and net-device-up and rabbitmq-server-running
9
 
stop on runlevel [016]
10
 
 
11
 
respawn
12
 
 
13
 
env longpoll_user="maas_longpoll"
14
 
env longpoll_pass=""
15
 
env longpoll_vhost="/maas_longpoll"
16
 
 
17
 
pre-start script
18
 
        if ! /usr/sbin/rabbitmqctl list_user_permissions $longpoll_user 1>/dev/null 2>&1; then
19
 
                longpoll_pass=`/bin/grep "password" /etc/maas/txlongpoll.yaml | cut -d'"' -f2`
20
 
                /usr/sbin/rabbitmqctl add_user "$longpoll_user" "$longpoll_pass"
21
 
                /usr/sbin/rabbitmqctl add_vhost "$longpoll_vhost"
22
 
                /usr/sbin/rabbitmqctl set_permissions -p "$longpoll_vhost" "$longpoll_user" ".*" ".*" ".*"
23
 
        fi
24
 
end script
25
 
 
26
 
# To add options to your daemon, edit the line below:
27
 
exec /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=/run/maas-txlongpoll.pid --logfile=/dev/null txlongpoll --config-file=/etc/maas/txlongpoll.yaml