-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-host.sh
More file actions
executable file
·67 lines (52 loc) · 1.74 KB
/
setup-host.sh
File metadata and controls
executable file
·67 lines (52 loc) · 1.74 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
#!/usr/bin/env bash
# script=$(curl -fsS "https://raw.githubusercontent.com/softvisio/scripts/main/setup-host.sh")
# source <(echo "$script")
# source <(echo "$script") 2>&1 | tee /setup-host.log
set -Eeuo pipefail
trap 'echo -e "⚠ Error ($0:$LINENO): $(sed -n "${LINENO}p" "$0" 2> /dev/null | grep -oE "\S.*\S|\S" || true)" >&2; return 3 2> /dev/null || exit 3' ERR
function _setup_host_debian() {
export DEBIAN_FRONTEND=noninteractive
apt-get update
# install common packages
apt-get install -y \
apt-utils \
bash-completion \
tar \
ca-certificates \
curl \
less \
sudo \
jq
# install public dotfiles profile
local script
script=$(curl -fsS "https://raw.githubusercontent.com/softvisio/scripts/main/update-dotfiles.sh")
source <(echo "$script") public
# postgresql tmp files
mkdir -p /etc/tmpfiles.d
cat << EOF > /etc/tmpfiles.d/postgresql.conf
d /var/run/postgresql 0755 root root
EOF
(
export DEBIAN_FRONTEND=noninteractive
# instal softvisio repository
script=$(curl -fsS "https://raw.githubusercontent.com/softvisio/deb-repository/main/setup.sh")
bash <(echo "$script") install
apt-get update
apt-get reinstall -y \
cloudflared.repository \
docker.repository \
git.repository \
git-lfs.repository \
github-cli.repository \
google-cloud.repository \
postgresql.repository
# upgrade installed packages to the latest versions
apt-get update
apt-get full-upgrade -y
)
apt-get install -y fnm
source /etc/profile.d/fnm.sh
# cleanup
apt-get autoremove -y
}
_setup_host_debian