Skip to content

Commit

Permalink
spellcheck improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddict committed Feb 25, 2024
1 parent bfc8228 commit 64af40f
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions deploy/eddict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,21 @@ eddict_deploy() {
fi
_savedeployconf DEPLOY_EDDICT_PWD "$DEPLOY_EDDICT_PWD"


# https://stackoverflow.com/a/42101141
# needed to call ssh_deploy() in ssh.sh
# shellcheck source-path=SCRIPTDIR
# https://stackoverflow.com/a/42101141
# needed to call ssh_deploy() in ssh.sh
# shellcheck source-path=SCRIPTDIR
. "$(dirname "$0")/deploy/ssh.sh"
# needed to call directadmin_deploy() in directadmin.sh
# shellcheck source-path=SCRIPTDIR
# needed to call directadmin_deploy() in directadmin.sh
# shellcheck source-path=SCRIPTDIR
. "$(dirname "$0")/deploy/directadmin.sh"

# # shellcheck source-path=SCRIPTDIR
# here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# . "$here/config.sh"
# . "$here/utils.sh"
# # shellcheck source-path=SCRIPTDIR
# here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# . "$here/config.sh"
# . "$here/utils.sh"

#/usr/local/bin/ssh not working
#/usr/local/bin/ssh: /lib/libc.so.6: version `GLIBC_2.20' not found (required by /usr/local/bin/ssh)
#/usr/local/bin/ssh not working
#/usr/local/bin/ssh: /lib/libc.so.6: version `GLIBC_2.20' not found (required by /usr/local/bin/ssh)
export DEPLOY_SSH_CMD="/usr/bin/ssh -T"

_eddict_directadmin
Expand All @@ -116,7 +115,7 @@ eddict_deploy() {
}

_clear() {
for _conf do
for _conf; do
_debug2 "Unsetting environment variable $_conf"
unset "$_conf"
_debug2 "_cleardomainconf SAVED_${_conf}"
Expand All @@ -125,18 +124,18 @@ _clear() {
}

_eddict_clearvariables() {
# In POSIX sh, arrays are undefined.
# _unset=(DEPLOY_SSH_USER DEPLOY_SSH_CMD DEPLOY_SSH_SERVER DEPLOY_SSH_KEYFILE DEPLOY_SSH_CERTFILE DEPLOY_SSH_CAFILE DEPLOY_SSH_FULLCHAIN DEPLOY_SSH_REMOTE_CMD DEPLOY_SSH_BACKUP DEPLOY_SSH_BACKUP_PATH DEPLOY_SSH_MULTI_CALL DEPLOY_SSH_USE_SCP DEPLOY_SSH_SCP_CMD)
# In POSIX sh, arrays are undefined.
# _unset=(DEPLOY_SSH_USER DEPLOY_SSH_CMD DEPLOY_SSH_SERVER DEPLOY_SSH_KEYFILE DEPLOY_SSH_CERTFILE DEPLOY_SSH_CAFILE DEPLOY_SSH_FULLCHAIN DEPLOY_SSH_REMOTE_CMD DEPLOY_SSH_BACKUP DEPLOY_SSH_BACKUP_PATH DEPLOY_SSH_MULTI_CALL DEPLOY_SSH_USE_SCP DEPLOY_SSH_SCP_CMD)
# for _conf in ${_unset[@]}
# do
# unset "$_conf"
# _cleardomainconf "SAVED_$_conf"
# done
# unset "$_conf"
# _cleardomainconf "SAVED_$_conf"
# done

# Rich’s sh (POSIX shell) tricks
# https://www.etalabs.net/sh_tricks.html
# Rich’s sh (POSIX shell) tricks
# https://www.etalabs.net/sh_tricks.html

# removed DEPLOY_SSH_CMD
# removed DEPLOY_SSH_CMD
set -- DEPLOY_SSH_USER DEPLOY_SSH_SERVER DEPLOY_SSH_KEYFILE DEPLOY_SSH_CERTFILE DEPLOY_SSH_CAFILE DEPLOY_SSH_FULLCHAIN DEPLOY_SSH_REMOTE_CMD DEPLOY_SSH_BACKUP DEPLOY_SSH_BACKUP_PATH DEPLOY_SSH_MULTI_CALL DEPLOY_SSH_USE_SCP DEPLOY_SSH_SCP_CMD
_clear "$@"

Expand Down Expand Up @@ -164,7 +163,7 @@ _eddict_ednas() {
_ssh_port="62222"
export DEPLOY_SSH_SERVER="${_ssh_server}:${_ssh_port}"

# read value from /usr/syno/etc/certificate/_archive/DEFAULT
# read value from /usr/syno/etc/certificate/_archive/DEFAULT
DEFAULT_CERT_FOLDER=$(${DEPLOY_SSH_CMD} -l ${DEPLOY_SSH_USER} -p ${_ssh_port} ${_ssh_server} "cat /usr/syno/etc/certificate/_archive/DEFAULT")
_debug DEFAULT_CERT_FOLDER "${DEFAULT_CERT_FOLDER}"

Expand Down Expand Up @@ -288,16 +287,16 @@ _eddict_edjellyfin() {
_isEcc "${CKEY}"
if _isEcc "${CKEY}"; then
_ecc="ecc"
fi
fi
_debug "${CDOMAIN}" "${_ecc}"

if ! toPkcs "${CDOMAIN}" "${DEPLOY_EDDICT_PWD}" "${_ecc}"; then
_err "Failure toPkcs, $CERT_PFX_PATH"
return 1
fi

_debug "$DEPLOY_SSH_KEYFILE"

export DEPLOY_SSH_USER="root"
_ssh_server="192.168.1.16"
_ssh_port="22"
Expand Down

0 comments on commit 64af40f

Please sign in to comment.