-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·66 lines (53 loc) · 3.64 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
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
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "The install script must be run as root."
exit 1
fi
mkdir -p /var/log/containers
if ! grep -q '/var/log/containers' /etc/fstab; then
echo "tmpfs /var/log/containers tmpfs rw,size=1G,nodev,nosuid,noexec,uid=root,gid=syslog,mode=775 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_978-html/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_978-html/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_978-html/_data tmpfs rw,size=50M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_978json-data/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_978json-data/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_978json-data/_data tmpfs rw,size=100M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_adsbx-data/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_adsbx-data/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_adsbx-data/_data tmpfs rw,size=100M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_collectd/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_collectd/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_collectd/_data tmpfs rw,size=100M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_graphs1090_graphs/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_graphs1090_graphs/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_graphs1090_graphs/_data tmpfs rw,size=50M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_graphs1090_html/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_graphs1090_html/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_graphs1090_html/_data tmpfs rw,size=10M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_json-data/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_json-data/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_json-data/_data tmpfs rw,size=100M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_public-html/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_public-html/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_public-html/_data tmpfs rw,size=50M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_tar1090_data/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_tar1090_data/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_tar1090_data/_data tmpfs rw,size=100M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mkdir -p /var/lib/docker/volumes/rasp-adsb-docker_tar1090_html/_data
if ! grep -q '/var/lib/docker/volumes/rasp-adsb-docker_tar1090_html/_data' /etc/fstab; then
echo "tmpfs /var/lib/docker/volumes/rasp-adsb-docker_tar1090_html/_data tmpfs rw,size=50M,nodev,nosuid,noexec,uid=root,gid=root,mode=755 0 0" >> /etc/fstab
fi
mount -a
cp 31-adsb-uat-rsyslog.conf /etc/rsyslog.d
cp adsb-uat-logrotate /etc/logrotate.d
systemctl restart rsyslog