script tweak

This commit is contained in:
dodger 2023-08-15 09:42:54 +02:00
parent 6f0bf2b66a
commit 5723df4790
Signed by: dodger
GPG Key ID: F6701F6CB4D1C826
2 changed files with 14 additions and 12 deletions

View File

@ -12,3 +12,11 @@ SMTPHOST="mta.thecompany.com"
SMTPUSER="smtp user" SMTPUSER="smtp user"
SMTPPASS="smpt host" SMTPPASS="smpt host"
MAILXBIN="/usr/bin/s-nail" MAILXBIN="/usr/bin/s-nail"
declare -a MANDATORYHEADERS
MANDATORYHEADERS=( 'Accept: application/json, text/plain, */*' 'Content-Type: application/json;charset=UTF-8' )
declare -a SIGNINHEADERS
SIGNINHEADERS=( 'Origin: https://thecompany.woffu.com' 'Host: thecompany.woffu.com:443' 'Expect:' )

View File

@ -40,11 +40,13 @@ RESET="\033[0;00m"
QUIETOUTPUT=false QUIETOUTPUT=false
NOW="$(date +%Y%m%d%H%M%S)" NOW="$(date +%Y%m%d%H%M%S)"
OUTPUTFILE="$(dirname "$(readlink -f "$0")")/logs/${NOW}_outputfile_$(basename "$0" .sh).log" SCRIPT_PATH="$(dirname "$(readlink -f "$0")")"
CONFIGFILE="$(dirname "$(readlink -f "$0")")/$(basename "$(readlink -f "$0")" .sh).config"
SCRIPTLOG="$(dirname "$(readlink -f "$0")")/logs/${NOW}_scriptlog_$(basename "$0" .sh).log" OUTPUTFILE="${SCRIPT_PATH}/logs/${NOW}_outputfile_$(basename "$0" .sh).log"
SCRIPTLOGERR="$(dirname "$(readlink -f "$0")")/logs/${NOW}_scriptlog_$(basename "$0" .sh).err" CONFIGFILE="${SCRIPT_PATH}/$(basename "$(readlink -f "$0")" .sh).config"
SCRIPTLOG="${SCRIPT_PATH}/logs/${NOW}_scriptlog_$(basename "$0" .sh).log"
SCRIPTLOGERR="${SCRIPT_PATH}/logs/${NOW}_scriptlog_$(basename "$0" .sh).err"
AUXFILE=$(mktemp) AUXFILE=$(mktemp)
TMPFILE=$(mktemp) TMPFILE=$(mktemp)
@ -53,14 +55,6 @@ TMPFILE=$(mktemp)
#MANDATORYHEADERS="${MANDATORYHEADERS} -H \"Content-Type: application/json;charset=UTF-8\"" #MANDATORYHEADERS="${MANDATORYHEADERS} -H \"Content-Type: application/json;charset=UTF-8\""
## TEDDYBEAR added after sourcing config file ## TEDDYBEAR added after sourcing config file
declare -a MANDATORYHEADERS
MANDATORYHEADERS=( 'Accept: application/json, text/plain, */*' 'Content-Type: application/json;charset=UTF-8' )
declare -a SIGNINHEADERS
SIGNINHEADERS=( 'Origin: https://voxelgroup.woffu.com' 'Host: voxelgroup.woffu.com:443' 'Expect:' )
############################################## ##############################################
# #
#/CONFIG #/CONFIG