forked from T0astBread/easymark-server-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·57 lines (44 loc) · 1.1 KB
/
install
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
#!/bin/bash
source framework/install
[[ -f .env ]] && source .env
# Section headers
H_ROOT_SECTION="9;Root Section"
H_APT_PACKAGES="3;APT Packages"
H_EASYMARK="4;EasyMark"
H_STARTUP_SERVICES="3;Startup Services"
H_DOTFILES="13;Dotfiles"
print_header $H_ROOT_SECTION
if [[ $EUID -eq 0 ]]; then
ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
print_header $H_APT_PACKAGES
modules/autoinstall
print_footer $H_APT_PACKAGES
print_header $H_EASYMARK
modules/easymark
print_footer $H_EASYMARK
print_header $H_STARTUP_SERVICES
modules/sudoers
echo "Locking root..."
passwd -l root
chsh -s /usr/bin/fish admin
cp -f etc/crontab /etc/crontab
chown root:root /etc/crontab
chmod u=rw,go=r /etc/crontab
modules/sshd
modules/journald
modules/smtp
modules/cloud-storage-backups
modules/autoupgrade
modules/ufw
modules/logwatch
modules/caddy
modules/swapfile
print_footer $H_STARTUP_SERVICES
else
echo "Not executing root section - not root"
fi
print_footer $H_ROOT_SECTION
print_header $H_DOTFILES
cp_dot config.fish .config/fish/config.fish
cp_dot gitconfig .gitconfig
print_footer $H_DOTFILES