blob: cfdb0d0381312c699f4570646bd7aa90c53a7b0a (
plain)
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
|
#!/usr/bin/env nu
#
# ~~~ dotfiles installer
#
#
# ~~~ variables
# get device
let DEVICE_ID = match (uname | get nodename) {
"companioncube" => "110",
"cavejohnson" => "120",
_ => { error make -u { msg: "invalid device" } }
}
# get locations
let DOTFILES_DIR = "/root/dotfiles"
#
# ~~~ install
rm "/etc/nginx/nginx.conf"
cp $"($DOTFILES_DIR)/src/($DEVICE_ID)/nginx.conf" "/etc/nginx/nginx.conf"
#
# ~~~ reset nginx
systemctl restart nginx
|