This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
install-servo.sh
executable file
·44 lines (37 loc) · 1.72 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
42
43
44
#!/bin/bash
#
# Copyright 2009-2016 Hewlett Packard Enterprise Development Company LP.
#
# 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 Hewlett Packard Enterprise Development Company LP., 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-prep /usr/libexec/load-balancer-servo/servo-prep
# Copy jar files
install -p -m 755 -D scripts/log4j.xml /var/lib/load-balancer-servo/log4j.xml