forked from honeycombio/honeyaws
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreinstall
More file actions
executable file
·33 lines (28 loc) · 854 Bytes
/
preinstall
File metadata and controls
executable file
·33 lines (28 loc) · 854 Bytes
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
#!/bin/sh
set -e
USER="honeycomb"
GROUP="honeycomb"
# TODO: Is creating user and group really needed if we assume honeytail exists?
# Create service group and user if they doesn't already exist
if ! getent group $GROUP >/dev/null
then
if type "groupadd" > /dev/null 2>&1; then
groupadd --system $GROUP >/dev/null
else
addgroup --system $GROUP >/dev/null
fi
fi
if ! getent passwd $USER >/dev/null
then
useradd \
--system \
-g $GROUP \
--home /nonexistent \
--shell /bin/false \
$USER >/dev/null
fi
usermod -a -G adm honeycomb
install -d -o honeycomb -g honeycomb /var/lib/honeyelb
install -d -o honeycomb -g honeycomb /var/lib/honeycloudformation
install -d -o honeycomb -g honeycomb /var/lib/honeycloudtrail
install -d -o honeycomb -g honeycomb /var/lib/honeyalb