-
Notifications
You must be signed in to change notification settings - Fork 1
/
ubuntu_install.sh
51 lines (37 loc) · 1.22 KB
/
ubuntu_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
#!/usr/bin/env bash
# test for root
if [[ "$USER" != "root" ]]; then
echo "$0 must be executed as root"
exit;
fi
SERVICES=(openssh-server)
SYSTEM_MONITORING=(htop nmon ncdu powertop cpufrequtils nmap)
SUPPORT=(sshfs xclip)
DEVELOPMENT=(git vim-nox tmux ccache stow)
GENERAL=(lynx pidgin libgnome2-bin tree gnome-tweak-tool)
# https://askubuntu.com/a/152369
SETTINGS=(compizconfig-settings-manager compiz-plugins)
function apt_get_install {
apt-get install --yes \
${SERVICES[*]} \
${SYSTEM_MONITORING[*]} \
${SUPPORT[*]} \
${DEVELOPMENT[*]} \
${GENERAL[*]} \
}
function customize_dconf {
# http://askubuntu.com/a/337210
# set to Disabled
dconf write /org/compiz/integrated/show-hud '[""]'
}
function nopasswd_sudoers {
# http://askubuntu.com/a/235264
# `pkexec visudo -f /etc/sudoers.d/01_ubuntu_install`: graphical validation of password, somehow gets around malformed /etc/sudoers.d issues
echo "$SUDO_USER ALL=NOPASSWD: /sbin/shutdown, /usr/sbin/pm-suspend, /usr/sbin/powertop, /usr/sbin/pm-hibernate" | \
sudo tee /etc/sudoers.d/01_ubuntu_install >/dev/null
}
apt-get update
apt-get dist-upgrade --yes
apt_get_install
customize_dconf
nopasswd_sudoers