-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinstall.sh
41 lines (34 loc) · 1.12 KB
/
install.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
#########################################
## ENVIRONMENTAL CONFIG ##
#########################################
# Configure user nobody to match unRAID's settings
export DEBIAN_FRONTEND="noninteractive"
usermod -u 99 nobody
usermod -g 100 nobody
usermod -d /home nobody
chown -R nobody:users /home
apt-get -q update
apt-get install -qy gdebi-core supervisor
#########################################
## FILES, SERVICES AND CONFIGURATION ##
#########################################
#config
cat <<'EOT' > /etc/my_init.d/config.sh
#!/bin/bash
if [[ $(cat /etc/timezone) != $TZ ]] ; then
echo "$TZ" > /etc/timezone
DEBIAN_FRONTEND="noninteractive" dpkg-reconfigure -f noninteractive tzdata
fi
EOT
chmod -R +x /etc/service/ /etc/my_init.d/
#########################################
## INSTALLATION ##
#########################################
chmod +x /opt/hdhomerun/hdhomerun_record_x64
chmod 666 /etc/hdhomerun.conf
#########################################
## CLEANUP ##
#########################################
# Clean APT install files
apt-get clean -y