~lutostag/ubuntu/trusty/maas/1.5.4+keystone

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
#!/usr/bin/env bash
# Copyright 2012-2013 Canonical Ltd.  This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).

# Exit immediately if a command exits with a non-zero status.
set -o errexit
# Treat unset variables as an error when substituting.
set -o nounset

# Move to the project root.
cd "$(dirname "$0")/../.."

# Start logging, if requested. Not using multilog here right now
# because there are race issues when restarting.
[ -z "${logdir:-}" ] || exec &>> "${logdir}/current"

# Exec the Provisioning Server.
script="$(readlink -f bin/twistd.pserv)"
config="$(readlink -f etc/maas/pserv.yaml)"

# Obtain the development setting for CLUSTER_UUID.
. etc/demo_maas_cluster.conf
export CLUSTER_UUID
export MAAS_URL

exec $(command -v authbind && echo --deep) \
    "${script}" --nodaemon --pidfile="" maas-pserv --config-file "${config}"