forked from eucalyptus/load-balancer-servo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-servo.sh
executable file
·41 lines (36 loc) · 1.67 KB
/
install-servo.sh
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
#!/bin/bash
#
# Copyright 2009-2013 Eucalyptus Systems, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# Please contact Eucalyptus Systems, Inc., 6755 Hollister Ave., Goleta
# CA 93117, USA or visit http://www.eucalyptus.com/licenses/ if you need
# additional information or have any questions.
#
# Simple script to install the servo service without using a package manager
# Install python code
python setup.py install
# Setup servo user
useradd -s /sbin/nologin -d /var/lib/load-balancer-servo -M servo
install -v -m 0440 scripts/servo-sudoers.conf /etc/sudoers.d/servo
# Setup needed for servo service
install -v -m 755 scripts/load-balancer-servo-init /etc/init.d/load-balancer-servo
sed -i 's/LOGLEVEL=info/LOGLEVEL=debug/' /etc/init.d/load-balancer-servo
# Use set gid for servo owned directories
install -v -m 6700 -o servo -g servo -d /var/{run,lib,log}/load-balancer-servo
chown servo:servo -R /etc/load-balancer-servo
chmod 700 /etc/load-balancer-servo
# NTP cronjob
install -p -m 755 -D scripts/servo-ntp-update /usr/libexec/load-balancer-servo/servo-ntp-update
install -p -m 0750 -D scripts/load-balancer-servo.cron /etc/cron.d/load-balancer-servo