Add some scripts
This commit is contained in:
0
script-drives-fix-btrfs-full
Normal file → Executable file
0
script-drives-fix-btrfs-full
Normal file → Executable file
32
script-install-hostnames
Normal file
32
script-install-hostnames
Normal 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 $?
|
||||
0
script-user-reset-x2go
Normal file → Executable file
0
script-user-reset-x2go
Normal file → Executable file
15
script-user-unban
Executable file
15
script-user-unban
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
# Unbans a fail2ban IP
|
||||
# Copyright 2021 Bryan C. Roessler
|
||||
|
||||
[[ -f functions ]] && . functions || exit 1
|
||||
|
||||
is_root
|
||||
|
||||
[[ $# -lt 1 ]] && echo "Must provide an IP address" && exit 1
|
||||
|
||||
IPADDRESS="$1"
|
||||
|
||||
fail2ban-client set sshd unbanip "$IPADDRESS"
|
||||
|
||||
exit $?
|
||||
Reference in New Issue
Block a user