Fix installer

This commit is contained in:
2021-10-22 17:44:13 -04:00
parent 3c18e69ab3
commit 92b51a1ea5
15 changed files with 59 additions and 16 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
old/ old/
manual.odt manual.odt
mwe

View File

@@ -3,7 +3,10 @@
# TODO generalize # TODO generalize
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Fix the btrfs out of space error # Fix the btrfs out of space error
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Smartly change permissions on selected directories # Smartly change permissions on selected directories
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Smartly change permissions on selected directories # Smartly change permissions on selected directories
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# This script will add scripts-* to the PATH and the manual to each user's Desktop # This script will add scripts-* to the PATH and the manual to each user's Desktop
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -1,8 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Install motd scripts # Install motd scripts
# Bryan C. Roessler
# shellcheck source=./functions parent="${BASH_SOURCE[0]}"
[[ -f functions ]] && . functions || exit 1 parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Adds a reverse proxy for local system services # Adds a reverse proxy for local system services
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Update and restart the system # Update and restart the system
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Update the system # Update the system
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Add a user to the Hartman Lab server # Add a user to the Hartman Lab server
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Remove a user from the server # Remove a user from the server
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# This script will reset a user password on the server # This script will reset a user password on the server
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# This script will reset x2go sessions to a working state # This script will reset x2go sessions to a working state
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root

View File

@@ -2,7 +2,10 @@
# Unbans a fail2ban IP # Unbans a fail2ban IP
# Copyright 2021 Bryan C. Roessler # Copyright 2021 Bryan C. Roessler
[[ -f functions ]] && . functions || exit 1 parent="${BASH_SOURCE[0]}"
parent=${parent%/*}
[[ -f "$parent"/functions ]] && . "$parent"/functions || exit 1
is_root is_root