-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_system
More file actions
executable file
·86 lines (58 loc) · 1.66 KB
/
setup_system
File metadata and controls
executable file
·86 lines (58 loc) · 1.66 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
set -e
exec 2> >(while read line; do echo -e "\e[01;31m$line\e[0m"; done)
source ./lib/functions.sh
script_name="$(basename "$0")"
dotfiles_dir="$(
cd "$(dirname "$0")"
pwd
)"
cd "$dotfiles_dir"
if (("$EUID")); then
sudo -s "$dotfiles_dir/$script_name" "$@"
exit 0
fi
head "Setting up /etc configs..."
copy "etc/environment"
copy "etc/default/earlyoom"
# copy "etc/profile.d/zz_custom.sh"
# copy "etc/zsh/zprofile"
# copy "etc/systemd/system/mnt-station-backups.mount"
# copy "etc/systemd/system/mnt-station-backups.automount"
head "Disable services..."
systemctl_disable_stop redis-server
systemctl_disable_stop mysql
systemctl_disable_stop postgresql
systemctl_disable_stop tor
systemctl_disable_stop mongodb
systemctl_disable_stop glances
systemctl_disable_stop colord
systemctl_disable_stop mpd
systemctl_disable_stop smb
# systemctl disable ipsec
# systemctl disable openvpn
head "Setting up root services..."
sysctl --system > /dev/null
systemctl daemon-reload
# systemctl_enable_start "system" "clock_mod_fix.service"
systemctl_enable_start "system" "ufw"
systemctl_enable_start "system" "tlp"
systemctl_enable_start "system" "docker"
# head "Install RVM..."
# stage_rvm
# head "Install RVM rubies..."
# stage_rvm_rubies
head "Configuring firewall..."
ufw --force reset >/dev/null
ufw default allow outgoing
ufw default deny incoming
ufw allow 1714:1764/udp #allow kde
ufw allow 1714:1764/tcp #allow kde
ufw allow 9090/tcp #allow calibre
ufw enable
head "Setting dash as /usr/bin/sh..."
ln -sfT dash /usr/bin/sh
head "Finalising..."
#usermod -a -G rvm bigforcegun
usermod -a -G docker bigforcegun
usermod -a -G input bigforcegun