🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-11 16:08:50 -04:00
parent 10fb6bbdf6
commit d899c3ba8e
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
6 changed files with 33 additions and 16 deletions

View File

@ -14,17 +14,20 @@
# @Resource : # @Resource :
# @sudo/root : no # @sudo/root : no
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
[ -n "$DEBUG" ] && set -x
set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="$(basename "$0")" APPNAME="$(basename "$0")"
VERSION="202207112331-git" VERSION="202207112331-git"
USER="${SUDO_USER:-${USER}}" USER="${SUDO_USER:-${USER}}"
HOME="${USER_HOME:-${HOME}}" HOME="${USER_HOME:-${HOME}}"
SRC_DIR="${BASH_SOURCE%/*}" SRC_DIR="${BASH_SOURCE%/*}"
SSL_DIR="${MY_SSL_HOME:-$(cd "$SRC_DIR/../CA" && echo "$PWD" || exit 1)}" SSL_DIR="${MY_SSL_HOME:-$SSL_DIR}"
SSL_SYS_DIR="${SSL_DIR}" SSL_SYS_DIR="${SSL_DIR}"
[ -n "$SSL_DIR" ] || SSL_DIR="/config/ssl"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options mkdir -p "$SSL_SYS_DIR" "$SSL_DIR"
if [[ "$1" == "--debug" ]]; then shift 1 && set -xo pipefail && export SCRIPT_OPTS="--debug" && export _DEBUG="on"; fi cd "$SSL_DIR"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ "$SSL_DIR" = "$SSL_SYS_DIR" ] || rsync -avhP "$SSL_DIR/." "$SSL_SYS_DIR/"
cd "$SSL_DIR/.." || exit 1
sudo mkdir -p "$SSL_SYS_DIR"
sudo rsync -avhP "." "$SSL_SYS_DIR/"

View File

@ -19,11 +19,13 @@ VERSION="202207112331-git"
USER="${SUDO_USER:-${USER}}" USER="${SUDO_USER:-${USER}}"
HOME="${USER_HOME:-${HOME}}" HOME="${USER_HOME:-${HOME}}"
SRC_DIR="${BASH_SOURCE%/*}" SRC_DIR="${BASH_SOURCE%/*}"
SSL_DIR="${MY_SSL_HOME:-$(cd "$SRC_DIR/../CasjaysDev" && echo "$PWD" || exit 1)}" SSL_DIR="${MY_SSL_HOME:-$SSL_DIR}"
REVOKE_FILE="revoke.crl" REVOKE_FILE="revoke.crl"
[ -n "$SSL_DIR" ] || SSL_DIR="/config/ssl"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mkdir -p "$SSL_DIR" "$SSL_DIR/crl" "$SSL_DIR/private" "$SSL_DIR/certs" "$SSL_DIR/p12" "$SSL_DIR/requests" mkdir -p "$SSL_DIR" "$SSL_DIR/crl" "$SSL_DIR/private" "$SSL_DIR/certs" "$SSL_DIR/p12" "$SSL_DIR/requests"
cd "$SSL_DIR" || exit 1 cd "$SSL_DIR" || exit 1
[[ -f "$SSL_DIR/certs/ca.crt" ]] || "$SRC_DIR/ca-setup.sh" [[ -f "$SSL_DIR/certs/ca.crt" ]] || "$SRC_DIR/ca-setup.sh"
openssl ca -config "$SSL_DIR/openssl.cnf" -gencrl -keyfile $SSL_DIR/private/ca.key -cert $SSL_DIR/certs/ca.crt -out "$SSL_DIR/crl/$REVOKE_FILE" -passin file:$SSL_DIR/passwd openssl ca -config "$SSL_DIR/openssl.cnf" -gencrl -keyfile $SSL_DIR/private/ca.key -cert $SSL_DIR/certs/ca.crt -out "$SSL_DIR/crl/$REVOKE_FILE" -passin file:$SSL_DIR/passwd
openssl crl -inform PEM -in "$SSL_DIR/crl/revoke.crl.pem" -outform DER -out "$SSL_DIR/crl/$REVOKE_FILE" openssl crl -inform PEM -in "$SSL_DIR/crl/revoke.crl.pem" -outform DER -out "$SSL_DIR/crl/$REVOKE_FILE"

View File

@ -14,16 +14,16 @@
# @Resource : # @Resource :
# @sudo/root : no # @sudo/root : no
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
[ -n "$DEBUG" ] && set -x
set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="$(basename "$0" 2>/dev/null)" APPNAME="$(basename "$0" 2>/dev/null)"
VERSION="202207112339-git" VERSION="202207112339-git"
HOME="${USER_HOME:-$HOME}" HOME="${USER_HOME:-$HOME}"
USER="${SUDO_USER:-$USER}" USER="${SUDO_USER:-$USER}"
RUN_USER="${SUDO_USER:-$USER}" RUN_USER="${SUDO_USER:-$USER}"
SRC_DIR="${BASH_SOURCE%/*}" SRC_DIR="${BASH_SOURCE%/*}"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
if [[ "$1" == "--debug" ]]; then shift 1 && set -xo pipefail && export SCRIPT_OPTS="--debug" && export _DEBUG="on"; fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set functions # Set functions
__exec_bash() { __exec_bash() {

View File

@ -14,6 +14,10 @@
# @Resource : # @Resource :
# @sudo/root : no # @sudo/root : no
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
[ -n "$DEBUG" ] && set -x
set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="$(basename "$0")" APPNAME="$(basename "$0")"
VERSION="202207112331-git" VERSION="202207112331-git"
USER="${SUDO_USER:-${USER}}" USER="${SUDO_USER:-${USER}}"

View File

@ -14,6 +14,10 @@
# @Resource : # @Resource :
# @sudo/root : no # @sudo/root : no
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
[ -n "$DEBUG" ] && set -x
set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="$(basename "$0")" APPNAME="$(basename "$0")"
VERSION="202207112331-git" VERSION="202207112331-git"
USER="${SUDO_USER:-${USER}}" USER="${SUDO_USER:-${USER}}"

View File

@ -14,6 +14,10 @@
# @Resource : # @Resource :
# @sudo/root : no # @sudo/root : no
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Set bash options
[ -n "$DEBUG" ] && set -x
set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
APPNAME="$(basename "$0")" APPNAME="$(basename "$0")"
VERSION="202207112331-git" VERSION="202207112331-git"
USER="${SUDO_USER:-${USER}}" USER="${SUDO_USER:-${USER}}"