Add some scripts

This commit is contained in:
2021-10-21 15:03:43 -04:00
parent 9de1ec589d
commit 8c3cbbfc72
4 changed files with 47 additions and 0 deletions

32
script-install-hostnames Normal file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# Adds hostnames for local system services
# Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1
is_root
dnf install -y nginx || exit $?
cat <<- 'EOF' > /etc/nginx/conf.d/hartmanlab.conf
server {
listen 80;
server_name cockpit;
location / {
proxy_pass http://127.0.0.1:9090/;
}
}
server {
listen 80;
server_name robot;
location / {
proxy_pass http://127.0.0.1:8888/;
}
}
EOF
systemctl enable --now nginx
exit $?