~andreserl/maas/release_beta7_utopic

« back to all changes in this revision

Viewing changes to debian/maas-cluster-controller.maas-cluster-register.upstart

* debian/maas-cluster-controller.maas-clusterd.upstart:
  - Don't start-up the cluster controller unless a shared-secret has
    been installed.
* debian/maas-cluster-controller.maas-cluster-register.upstart: Drop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# maas-cluster-controller - provisioning service
2
 
#
3
 
# MAAS Cluster Controller Service
4
 
 
5
 
description     "MAAS Cluster Controller"
6
 
author "Julian Edwards <julian.edwards@canonical.com>"
7
 
 
8
 
start on filesystem and net-device-up
9
 
stop on runlevel [016]
10
 
 
11
 
env CONFIG_FILE=/etc/maas/maas_cluster.conf
12
 
# Use cluster config.
13
 
env CELERY_CONFIG_MODULE="celeryconfig_cluster"
14
 
 
15
 
pre-start script
16
 
    if [ ! -f $CONFIG_FILE ]; then
17
 
        echo "$CONFIG_FILE does not exist.  Aborting."
18
 
        stop
19
 
        exit 0
20
 
    fi
21
 
end script
22
 
 
23
 
script
24
 
    # Prepare settings.
25
 
    . $CONFIG_FILE
26
 
    # Allow the cluster-controller process to read CLUSTER_UUID as set
27
 
    # in that config file.
28
 
    export CLUSTER_UUID
29
 
    exec /usr/bin/authbind --deep /usr/sbin/maas-provision start-cluster-controller $MAAS_URL
30
 
end script