2022-07-11 23:40:12 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
##@Version : 202207112331-git
|
|
|
|
# @Author : Jason Hempstead
|
|
|
|
# @Contact : jason@casjaysdev.com
|
|
|
|
# @License : LICENSE.md
|
|
|
|
# @ReadME : ca-install.sh --help
|
|
|
|
# @Copyright : Copyright: (c) Jason Hempstead, Casjays Developments
|
|
|
|
# @Created : Monday, Jul 11, 2022 23:31 EDT
|
|
|
|
# @File : ca-install.sh
|
|
|
|
# @Description :
|
|
|
|
# @TODO :
|
|
|
|
# @Other :
|
|
|
|
# @Resource :
|
|
|
|
# @sudo/root : no
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2022-10-11 16:08:50 -04:00
|
|
|
# Set bash options
|
|
|
|
[ -n "$DEBUG" ] && set -x
|
|
|
|
set -o pipefail
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2022-07-11 23:40:12 -04:00
|
|
|
APPNAME="$(basename "$0")"
|
|
|
|
VERSION="202207112331-git"
|
|
|
|
USER="${SUDO_USER:-${USER}}"
|
|
|
|
HOME="${USER_HOME:-${HOME}}"
|
|
|
|
SRC_DIR="${BASH_SOURCE%/*}"
|
2022-10-11 16:08:50 -04:00
|
|
|
SSL_DIR="${MY_SSL_HOME:-$SSL_DIR}"
|
2022-07-11 23:40:12 -04:00
|
|
|
SSL_SYS_DIR="${SSL_DIR}"
|
2022-10-11 16:08:50 -04:00
|
|
|
[ -n "$SSL_DIR" ] || SSL_DIR="/config/ssl"
|
2022-07-11 23:40:12 -04:00
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2022-10-11 16:08:50 -04:00
|
|
|
mkdir -p "$SSL_SYS_DIR" "$SSL_DIR"
|
|
|
|
cd "$SSL_DIR"
|
|
|
|
[ "$SSL_DIR" = "$SSL_SYS_DIR" ] || rsync -avhP "$SSL_DIR/." "$SSL_SYS_DIR/"
|
|
|
|
|