-
Notifications
You must be signed in to change notification settings - Fork 22
/
zenoss_init_pre
executable file
·73 lines (56 loc) · 1.65 KB
/
zenoss_init_pre
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#! /usr/bin/env bash
#
# zenoss_init_pre
#
# This script is intended to be run before the zenoss processes have
# been started for the first time.
#
# Note: it is run by root
#
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2007, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################
# load startup parameters
. ${ZENHOME}/bin/zenoss_startup_config
# load the installation functions
. ${ZENHOME}/bin/shared-functions.sh
. ${ZENHOME}/bin/install-functions.sh
# Test for Sun/Oracle flavored jre
confirm_jre
# Confirm installed RRDtool
confirm_rrd
# set the python shebang line
shebang
# create the log directory
mkdir -p ${ZENHOME}/log
# start rabbit
start_rabbitmq
start_mysql
start_redis
# copy the etc/*.conf.example files to etc/*.conf if etc/*.conf don't
# already exist (we don't want to clobber people's configs)
update_conf_files
# Update AMQP configuration files
configure_amqp
# create the zodb session database
create_zodb_session_db
# create the database for ZODB
create_zodb_db
# create the ZEP database
create_zep_db
# set up the zope instance
run_mkzopeinstance
# Register zproxy scripts and conf
register_zproxy
# Remediate file ownership under $ZENHOME.
fix_zenhome_owner_and_group ${OS_USERNAME}
run_zenbuild
# this must be done before zenoss starts so that the daemons
# have the correct credentials
echo "Creating system account"
${ZENHOME}/bin/zendmd --script ${ZENHOME}/bin/addSystemUser.py