feat: add curl options environment variable
This commit is contained in:
4 files changed
+29
-5
No files matched your search
@@ -11,9 +11,13 @@
|
|||||||
# BACKUP_FILE_SUFFIX="%Y%m%d"
|
# BACKUP_FILE_SUFFIX="%Y%m%d"
|
||||||
# BACKUP_KEEP_DAYS="0"
|
# BACKUP_KEEP_DAYS="0"
|
||||||
# PING_URL=""
|
# PING_URL=""
|
||||||
|
# PING_URL_CURL_OPTIONS=""
|
||||||
# PING_URL_WHEN_START=""
|
# PING_URL_WHEN_START=""
|
||||||
|
# PING_URL_WHEN_START_CURL_OPTIONS=""
|
||||||
# PING_URL_WHEN_SUCCESS=""
|
# PING_URL_WHEN_SUCCESS=""
|
||||||
|
# PING_URL_WHEN_SUCCESS_CURL_OPTIONS=""
|
||||||
# PING_URL_WHEN_FAILURE=""
|
# PING_URL_WHEN_FAILURE=""
|
||||||
|
# PING_URL_WHEN_FAILURE_CURL_OPTIONS=""
|
||||||
# MAIL_SMTP_ENABLE="FALSE"
|
# MAIL_SMTP_ENABLE="FALSE"
|
||||||
# MAIL_SMTP_VARIABLES=""
|
# MAIL_SMTP_VARIABLES=""
|
||||||
# MAIL_TO=""
|
# MAIL_TO=""
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ COPY scripts/*.sh /app/
|
|||||||
|
|
||||||
RUN chmod +x /app/*.sh \
|
RUN chmod +x /app/*.sh \
|
||||||
&& mkdir -m 777 /bitwarden \
|
&& mkdir -m 777 /bitwarden \
|
||||||
&& apk add --no-cache 7zip bash mariadb-client postgresql16-client sqlite supercronic s-nail tzdata \
|
&& apk add --no-cache 7zip bash curl mariadb-client postgresql16-client sqlite supercronic s-nail tzdata \
|
||||||
&& apk info --no-cache -Lq mariadb-client | grep -vE '/bin/mariadb$' | grep -vE '/bin/mariadb-dump$' | xargs -I {} rm -f "/{}" \
|
&& apk info --no-cache -Lq mariadb-client | grep -vE '/bin/mariadb$' | grep -vE '/bin/mariadb-dump$' | xargs -I {} rm -f "/{}" \
|
||||||
&& ln -sf "${LOCALTIME_FILE}" /etc/localtime \
|
&& ln -sf "${LOCALTIME_FILE}" /etc/localtime \
|
||||||
&& addgroup -g "${USER_ID}" "${USER_NAME}" \
|
&& addgroup -g "${USER_ID}" "${USER_NAME}" \
|
||||||
|
|||||||
@@ -27,9 +27,13 @@ services:
|
|||||||
# BACKUP_FILE_SUFFIX: '%Y%m%d'
|
# BACKUP_FILE_SUFFIX: '%Y%m%d'
|
||||||
# BACKUP_KEEP_DAYS: 0
|
# BACKUP_KEEP_DAYS: 0
|
||||||
# PING_URL: ''
|
# PING_URL: ''
|
||||||
|
# PING_URL_CURL_OPTIONS: ''
|
||||||
# PING_URL_WHEN_START: ''
|
# PING_URL_WHEN_START: ''
|
||||||
|
# PING_URL_WHEN_START_CURL_OPTIONS: ''
|
||||||
# PING_URL_WHEN_SUCCESS: ''
|
# PING_URL_WHEN_SUCCESS: ''
|
||||||
|
# PING_URL_WHEN_SUCCESS_CURL_OPTIONS: ''
|
||||||
# PING_URL_WHEN_FAILURE: ''
|
# PING_URL_WHEN_FAILURE: ''
|
||||||
|
# PING_URL_WHEN_FAILURE_CURL_OPTIONS: ''
|
||||||
# MAIL_SMTP_ENABLE: 'FALSE'
|
# MAIL_SMTP_ENABLE: 'FALSE'
|
||||||
# MAIL_SMTP_VARIABLES: ''
|
# MAIL_SMTP_VARIABLES: ''
|
||||||
# MAIL_TO: ''
|
# MAIL_TO: ''
|
||||||
|
|||||||
+20
-4
@@ -345,16 +345,16 @@ function init_env() {
|
|||||||
color yellow "BACKUP_FILE_DATE_FORMAT: ${BACKUP_FILE_DATE_FORMAT} (example \"[filename].$(date +"${BACKUP_FILE_DATE_FORMAT}").[ext]\")"
|
color yellow "BACKUP_FILE_DATE_FORMAT: ${BACKUP_FILE_DATE_FORMAT} (example \"[filename].$(date +"${BACKUP_FILE_DATE_FORMAT}").[ext]\")"
|
||||||
color yellow "BACKUP_KEEP_DAYS: ${BACKUP_KEEP_DAYS}"
|
color yellow "BACKUP_KEEP_DAYS: ${BACKUP_KEEP_DAYS}"
|
||||||
if [[ -n "${PING_URL}" ]]; then
|
if [[ -n "${PING_URL}" ]]; then
|
||||||
color yellow "PING_URL: ${PING_URL}"
|
color yellow "PING_URL: curl${PING_URL_CURL_OPTIONS:+" ${PING_URL_CURL_OPTIONS}"} ${PING_URL}"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${PING_URL_WHEN_START}" ]]; then
|
if [[ -n "${PING_URL_WHEN_START}" ]]; then
|
||||||
color yellow "PING_URL_WHEN_START: ${PING_URL_WHEN_START}"
|
color yellow "PING_URL_WHEN_START: curl${PING_URL_WHEN_START_CURL_OPTIONS:+" ${PING_URL_WHEN_START_CURL_OPTIONS}"} ${PING_URL_WHEN_START}"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${PING_URL_WHEN_SUCCESS}" ]]; then
|
if [[ -n "${PING_URL_WHEN_SUCCESS}" ]]; then
|
||||||
color yellow "PING_URL_WHEN_SUCCESS: ${PING_URL_WHEN_SUCCESS}"
|
color yellow "PING_URL_WHEN_SUCCESS: curl${PING_URL_WHEN_SUCCESS_CURL_OPTIONS:+" ${PING_URL_WHEN_SUCCESS_CURL_OPTIONS}"} ${PING_URL_WHEN_SUCCESS}"
|
||||||
fi
|
fi
|
||||||
if [[ -n "${PING_URL_WHEN_FAILURE}" ]]; then
|
if [[ -n "${PING_URL_WHEN_FAILURE}" ]]; then
|
||||||
color yellow "PING_URL_WHEN_FAILURE: ${PING_URL_WHEN_FAILURE}"
|
color yellow "PING_URL_WHEN_FAILURE: curl${PING_URL_WHEN_FAILURE_CURL_OPTIONS:+" ${PING_URL_WHEN_FAILURE_CURL_OPTIONS}"} ${PING_URL_WHEN_FAILURE}"
|
||||||
fi
|
fi
|
||||||
color yellow "MAIL_SMTP_ENABLE: ${MAIL_SMTP_ENABLE}"
|
color yellow "MAIL_SMTP_ENABLE: ${MAIL_SMTP_ENABLE}"
|
||||||
if [[ "${MAIL_SMTP_ENABLE}" == "TRUE" ]]; then
|
if [[ "${MAIL_SMTP_ENABLE}" == "TRUE" ]]; then
|
||||||
@@ -452,17 +452,33 @@ function init_env_ping() {
|
|||||||
get_env PING_URL
|
get_env PING_URL
|
||||||
PING_URL="${PING_URL:-""}"
|
PING_URL="${PING_URL:-""}"
|
||||||
|
|
||||||
|
# PING_URL_CURL_OPTIONS
|
||||||
|
get_env PING_URL_CURL_OPTIONS
|
||||||
|
PING_URL_CURL_OPTIONS="${PING_URL_CURL_OPTIONS:-""}"
|
||||||
|
|
||||||
# PING_URL_WHEN_START
|
# PING_URL_WHEN_START
|
||||||
get_env PING_URL_WHEN_START
|
get_env PING_URL_WHEN_START
|
||||||
PING_URL_WHEN_START="${PING_URL_WHEN_START:-""}"
|
PING_URL_WHEN_START="${PING_URL_WHEN_START:-""}"
|
||||||
|
|
||||||
|
# PING_URL_WHEN_START_CURL_OPTIONS
|
||||||
|
get_env PING_URL_WHEN_START_CURL_OPTIONS
|
||||||
|
PING_URL_WHEN_START_CURL_OPTIONS="${PING_URL_WHEN_START_CURL_OPTIONS:-""}"
|
||||||
|
|
||||||
# PING_URL_WHEN_SUCCESS
|
# PING_URL_WHEN_SUCCESS
|
||||||
get_env PING_URL_WHEN_SUCCESS
|
get_env PING_URL_WHEN_SUCCESS
|
||||||
PING_URL_WHEN_SUCCESS="${PING_URL_WHEN_SUCCESS:-""}"
|
PING_URL_WHEN_SUCCESS="${PING_URL_WHEN_SUCCESS:-""}"
|
||||||
|
|
||||||
|
# PING_URL_WHEN_SUCCESS_CURL_OPTIONS
|
||||||
|
get_env PING_URL_WHEN_SUCCESS_CURL_OPTIONS
|
||||||
|
PING_URL_WHEN_SUCCESS_CURL_OPTIONS="${PING_URL_WHEN_SUCCESS_CURL_OPTIONS:-""}"
|
||||||
|
|
||||||
# PING_URL_WHEN_FAILURE
|
# PING_URL_WHEN_FAILURE
|
||||||
get_env PING_URL_WHEN_FAILURE
|
get_env PING_URL_WHEN_FAILURE
|
||||||
PING_URL_WHEN_FAILURE="${PING_URL_WHEN_FAILURE:-""}"
|
PING_URL_WHEN_FAILURE="${PING_URL_WHEN_FAILURE:-""}"
|
||||||
|
|
||||||
|
# PING_URL_WHEN_FAILURE_CURL_OPTIONS
|
||||||
|
get_env PING_URL_WHEN_FAILURE_CURL_OPTIONS
|
||||||
|
PING_URL_WHEN_FAILURE_CURL_OPTIONS="${PING_URL_WHEN_FAILURE_CURL_OPTIONS:-""}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function init_env_mail() {
|
function init_env_mail() {
|
||||||
|
|||||||
Reference in new issue
Block a user