-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
60 lines (48 loc) · 1.09 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
#!/bin/bash
# Check if the script is running with root privileges
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root." >&2
exit 1
fi
# Update first
apt-get update
# Set up screen
apt-get install -y screen
echo "caption always \"%{= kw}%-w%{= kG}%{+b}[%n %t]%{-b}%{= kw}%+w %= [%l] %0c:%s %{-}\"
startup_message off" >> ~/.screenrc
mkdir /mnt/hdd1
# Setting up Samba home folder
apt-get install -y samba
# Add Samba configuration for home folder
echo "[$HOSTNAME-home]
comment=$HOSTNAME-home
path=/home/$USER
browseable=yes
writeable=yes
only guest=no
create mask=0740
directory mask=0750
public=no
[$HOSTNAME-public]
comment=$HOSTNAME-public
path=/mnt/hdd1/public
browseable=yes
only guest=no
create mask=0740
directory mask=0750
public=yes
[$HOSTNAME-hdd]
comment=$HOSTNAME-hdd
path=/mnt/hdd1/
browseable=yes
only guest=no
create mask=0740
directory mask=0750
public=no" >> /etc/samba/smb.conf
# Set Samba user
smbpasswd -a $USER
echo "Samba configuration finished."
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
exit