Compare commits

...

35 Commits
3.0.8 ... 3.0.9

Author SHA1 Message Date
neil
fc7f86104e Merge pull request #5290 from acmesh-official/dev
sync
2024-09-18 08:58:43 +02:00
neil
d057a9bb6d update version 2024-09-18 08:57:32 +02:00
neil
167aba6f26 Merge pull request #5285 from markt-de/fix_nsupdate
URGENT: fix dns_nsupdate when NSUPDATE_OPT is empty
2024-09-17 17:52:09 +02:00
Frank Wall
9ecd84080b resolve shellcheck offenses
With nsupdate the rule seems to be: filenames need to be wrapped
in double quotes, while all other options must not use double quotes.
Hence there is no way to resolve the shellcheck offense, because
the key requires quotes, but the other options must not use quotes.
2024-09-17 15:27:46 +02:00
Frank Wall
22d260f4e6 fix dns_nsupdate when NSUPDATE_OPT is empty, refs #5224 2024-09-16 16:49:28 +02:00
neil
ea94477cd4 Merge pull request #5229 from tomo2403/master
Update bark.sh
2024-09-15 17:51:52 +02:00
tomo
522c953860 Update dockerhub.yml 2024-09-15 17:08:09 +02:00
neil
f86ee84457 fix format 2024-09-15 14:31:15 +02:00
neil
2d282597ca fix format 2024-09-15 14:30:12 +02:00
neil
8635d89cc8 Merge pull request #5029 from scruel/patch-2
Prevent leaving blank lines in config file after cleared keys.
2024-09-15 13:58:09 +02:00
neil
dc341ef9c1 Merge pull request #5149 from Weishaupt/patch-1
Fix missing XML Escape in Password of INWX DNS API
2024-09-15 13:46:38 +02:00
neil
beb31ab2fa Merge pull request #5246 from 3VAbdAVE/dev
Updating unifi deploy hook - remove keytool requirement
2024-09-15 13:43:18 +02:00
neil
e0214a2c2a Merge pull request #5218 from IIIPr0t0typ3III/dev
2 Bugfixes of `dns_dynv6.sh`: 1. domains containing 'id' are now working as intended and 2. hostnames are now cast to lowercase on the fly
2024-09-15 13:39:27 +02:00
neil
5275daa66c Merge pull request #5231 from mickaelmonsieur/master
Update dns_ispconfig.sh
2024-09-15 13:35:38 +02:00
3VAbdAVE
a94653ba77 Merge branch 'dev' of https://github.com/3VAbdAVE/acme.sh into dev 2024-08-15 11:25:36 -04:00
3VAbdAVE
d8637b2c0f fixes #3359
Ubiquiti removed keytool (and java) from recent releases of Unifi OS. This moves from keytool to openssl's native pkcs12.

Tested on Unifi Dream Machine which runs Unifi OS and a built-in Unifi controller.

Also added backup of existing files prior to change in case anything goes wrong, and update system configuration with compatible ciphers.
2024-08-15 11:25:23 -04:00
3VAbdAVE
f1b6016157 Merge branch 'acmesh-official:dev' into dev 2024-08-15 11:18:31 -04:00
3VAbdAVE
de99d6d9fc fixed shfmt 2024-08-15 11:09:40 -04:00
3VAbdAVE
ca6226359b removed old comment 2024-08-11 22:49:20 -04:00
3VAbdAVE
adfafe5c54 reverted bad merge 2024-08-11 22:48:44 -04:00
3VAbdAVE
a8d8fefceb Merge branch 'acmesh-official:dev' into dev 2024-08-11 22:47:00 -04:00
3VAbdAVE
3bb5943b20 Merge branch 'dev' of https://github.com/3VAbdAVE/acme.sh into dev 2024-08-11 22:44:13 -04:00
3VAbdAVE
57da04b5ec Updated Unifi deploy hook to use openssl's pkcs12 instead of Java Keytool after Ubiquiti removed it, update system configuration for stronger ciphers, and back up existing certificates prior to change. 2024-08-11 22:39:47 -04:00
3VAbdAVE
de902166a8 Replaced keytool with openssl pkcs12. Added backup of original certificates. 2024-08-01 08:15:16 -07:00
Mickael
cb5eae888d Update dns_ispconfig.sh
Add permissions to:
- Client functions
- DNS zone functions
2024-07-31 16:22:12 +02:00
tomo
b6f7710621 Update bark.sh
Bark API v2 is now fully implemented. BARK_SOUND is now also optional, as intended by the API.
2024-07-27 14:28:07 +02:00
tomo
3e36f05a8c Update dockerhub.yml 2024-07-27 14:23:07 +02:00
Felix Schmidt
dd582c0306 Changed the direct call of tr to cast to lower case to the function
`_lower_case` which is already provided.
2024-07-23 12:59:42 +02:00
IIIPr0t0typ3III
0a64567822 Merge branch 'acmesh-official:dev' into dev 2024-07-22 15:47:54 +02:00
Felix Schmidt
ab86e056a2 Changed A-Z and a-z to [:upper:] and [:lower:] from last commit to comply with requested standards.
This does not change any functionality in this special case but the
request for [:upper:] and [:lower:] makes a lot of sense in general.
2024-07-07 13:02:47 +02:00
Felix Schmidt
a2bc79ddd5 Fixed a bug where trying to add entries where the fulldomain contains upper case characters would not be accepted (dynv6 API rejects those).
Now the fulldomain will be cast to lowercase first which should not make
any difference since DNS is case insensitive.
2024-07-07 12:34:44 +02:00
IIIPr0t0typ3III
5789e80d74 Fixed a bug where the zone_id was corrupted for domains containing the string 'id' dns_dynv6.sh
This will now search for `"id:"` instead of `id` and therefore will only find the id field and not any other field containing the sub-string 'id'
2024-07-05 18:43:11 +02:00
Marvin Dickhaus
fd461fe015 Fix missing XML Escaping in Password String
Fixes #5060
2024-05-16 22:44:47 +02:00
3VAbdAVE
b1d019146a UBNT removed keytool from UnifiOS, modify to use openssl PKCS12. Also backup certificates before overwrite, and force unifi to start with unifi-core if both are installed. 2024-05-13 07:50:46 -04:00
Scruel Tao
bd3a2b1bb5 Prevent leaving blank lines in config file after cleared keys. 2024-02-27 12:40:52 +08:00
8 changed files with 190 additions and 44 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env sh
VER=3.0.8
VER=3.0.9
PROJECT_NAME="acme.sh"
@@ -2361,7 +2361,7 @@ _clear_conf() {
_sdkey="$2"
if [ "$_c_c_f" ]; then
_conf_data="$(cat "$_c_c_f")"
echo "$_conf_data" | sed "s/^$_sdkey *=.*$//" >"$_c_c_f"
echo "$_conf_data" | sed "/^$_sdkey *=.*$/d" >"$_c_c_f"
else
_err "Config file is empty, cannot clear"
fi

View File

@@ -113,9 +113,9 @@ synology_dsm_deploy() {
# Default values for scheme, hostname and port
# Defaulting to localhost and http, because it's localhost…
[ -n "$SYNO_SCHEME" ] || SYNO_SCHEME="http"
[ -n "$SYNO_HOSTNAME" ] || SYNO_HOSTNAME="localhost"
[ -n "$SYNO_PORT" ] || SYNO_PORT="5000"
[ -n "$SYNO_SCHEME" ] || SYNO_SCHEME=http
[ -n "$SYNO_HOSTNAME" ] || SYNO_HOSTNAME=localhost
[ -n "$SYNO_PORT" ] || SYNO_PORT=5000
_savedeployconf SYNO_SCHEME "$SYNO_SCHEME"
_savedeployconf SYNO_HOSTNAME "$SYNO_HOSTNAME"
_savedeployconf SYNO_PORT "$SYNO_PORT"

View File

@@ -5,6 +5,15 @@
# - self-hosted Unifi Controller
# - Unifi Cloud Key (Gen1/2/2+)
# - Unifi Cloud Key running UnifiOS (v2.0.0+, Gen2/2+ only)
# - Unifi Dream Machine
# This has not been tested on other "all-in-one" devices such as
# UDM Pro or Unifi Express.
#
# OS Version v2.0.0+
# Network Application version 7.0.0+
# OS version ~3.1 removed java and keytool from the UnifiOS.
# Using PKCS12 format keystore appears to work fine.
#
# Please report bugs to https://github.com/acmesh-official/acme.sh/issues/3359
#returns 0 means success, otherwise error.
@@ -74,14 +83,16 @@ unifi_deploy() {
_reload_cmd=""
# Unifi Controller environment (self hosted or any Cloud Key) --
# auto-detect by file /usr/lib/unifi/data/keystore:
# auto-detect by file /usr/lib/unifi/data/keystore
_unifi_keystore="${DEPLOY_UNIFI_KEYSTORE:-/usr/lib/unifi/data/keystore}"
if [ -f "$_unifi_keystore" ]; then
_info "Installing certificate for Unifi Controller (Java keystore)"
_debug _unifi_keystore "$_unifi_keystore"
if ! _exists keytool; then
_err "keytool not found"
return 1
_do_keytool=0
_info "Installing certificate for Unifi Controller (PKCS12 keystore)."
else
_do_keytool=1
_info "Installing certificate for Unifi Controller (Java keystore)"
fi
if [ ! -w "$_unifi_keystore" ]; then
_err "The file $_unifi_keystore is not writable, please change the permission."
@@ -92,6 +103,7 @@ unifi_deploy() {
_debug "Generate import pkcs12"
_import_pkcs12="$(_mktemp)"
_debug "_toPkcs $_import_pkcs12 $_ckey $_ccert $_cca $_unifi_keypass unifi root"
_toPkcs "$_import_pkcs12" "$_ckey" "$_ccert" "$_cca" "$_unifi_keypass" unifi root
# shellcheck disable=SC2181
if [ "$?" != "0" ]; then
@@ -99,22 +111,57 @@ unifi_deploy() {
return 1
fi
_debug "Import into keystore: $_unifi_keystore"
if keytool -importkeystore \
-deststorepass "$_unifi_keypass" -destkeypass "$_unifi_keypass" -destkeystore "$_unifi_keystore" \
-srckeystore "$_import_pkcs12" -srcstoretype PKCS12 -srcstorepass "$_unifi_keypass" \
-alias unifi -noprompt; then
_debug "Import keystore success!"
rm "$_import_pkcs12"
# Save the existing keystore in case something goes wrong.
mv -f "${_unifi_keystore}" "${_unifi_keystore}"_original
_info "Previous keystore saved to ${_unifi_keystore}_original."
if [ "$_do_keytool" -eq 1 ]; then
_debug "Import into keystore: $_unifi_keystore"
if keytool -importkeystore \
-deststorepass "$_unifi_keypass" -destkeypass "$_unifi_keypass" -destkeystore "$_unifi_keystore" \
-srckeystore "$_import_pkcs12" -srcstoretype PKCS12 -srcstorepass "$_unifi_keypass" \
-alias unifi -noprompt; then
_debug "Import keystore success!"
else
_err "Error importing into Unifi Java keystore."
_err "Please re-run with --debug and report a bug."
_info "Restoring original keystore."
mv -f "${_unifi_keystore}"_original "${_unifi_keystore}"
rm "$_import_pkcs12"
return 1
fi
else
_err "Error importing into Unifi Java keystore."
_err "Please re-run with --debug and report a bug."
rm "$_import_pkcs12"
return 1
_debug "Copying new keystore to $_unifi_keystore"
cp -f "$_import_pkcs12" "$_unifi_keystore"
fi
# Update unifi service for certificate cipher compatibility
if ${ACME_OPENSSL_BIN:-openssl} pkcs12 \
-in "$_import_pkcs12" \
-password pass:aircontrolenterprise \
-nokeys | ${ACME_OPENSSL_BIN:-openssl} x509 -text \
-noout | grep -i "signature" | grep -iq ecdsa >/dev/null 2>&1; then
cp -f /usr/lib/unifi/data/system.properties /usr/lib/unifi/data/system.properties_original
_info "Updating system configuration for cipher compatibility."
_info "Saved original system config to /usr/lib/unifi/data/system.properties_original"
sed -i '/unifi\.https\.ciphers/d' /usr/lib/unifi/data/system.properties
echo "unifi.https.ciphers=ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES128-GCM-SHA256" >>/usr/lib/unifi/data/system.properties
sed -i '/unifi\.https\.sslEnabledProtocols/d' /usr/lib/unifi/data/system.properties
echo "unifi.https.sslEnabledProtocols=TLSv1.3,TLSv1.2" >>/usr/lib/unifi/data/system.properties
_info "System configuration updated."
fi
rm "$_import_pkcs12"
# Restarting unifi-core will bring up unifi, doing it out of order results in
# a certificate error, and breaks wifiman.
# Restart if we aren't doing unifi-core, otherwise stop for later restart.
if systemctl -q is-active unifi; then
_reload_cmd="${_reload_cmd:+$_reload_cmd && }service unifi restart"
if [ ! -f "${DEPLOY_UNIFI_CORE_CONFIG:-/data/unifi-core/config}/unifi-core.key" ]; then
_reload_cmd="${_reload_cmd:+$_reload_cmd && }systemctl restart unifi"
else
_reload_cmd="${_reload_cmd:+$_reload_cmd && }systemctl stop unifi"
fi
fi
_services_updated="${_services_updated} unifi"
_info "Install Unifi Controller certificate success!"
@@ -165,6 +212,11 @@ unifi_deploy() {
return 1
fi
# Save the existing certs in case something goes wrong.
cp -f "${_unifi_core_config}"/unifi-core.crt "${_unifi_core_config}"/unifi-core_original.crt
cp -f "${_unifi_core_config}"/unifi-core.key "${_unifi_core_config}"/unifi-core_original.key
_info "Previous certificate and key saved to ${_unifi_core_config}/unifi-core_original.crt/key."
cat "$_cfullchain" >"${_unifi_core_config}/unifi-core.crt"
cat "$_ckey" >"${_unifi_core_config}/unifi-core.key"

View File

@@ -16,8 +16,8 @@ dynv6_api="https://dynv6.com/api/v2"
# Please Read this guide first: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide
#Usage: dns_dynv6_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_dynv6_add() {
fulldomain=$1
txtvalue=$2
fulldomain="$(echo "$1" | _lower_case)"
txtvalue="$2"
_info "Using dynv6 api"
_debug fulldomain "$fulldomain"
_debug txtvalue "$txtvalue"
@@ -50,8 +50,8 @@ dns_dynv6_add() {
#Usage: fulldomain txtvalue
#Remove the txt record after validation.
dns_dynv6_rm() {
fulldomain=$1
txtvalue=$2
fulldomain="$(echo "$1" | _lower_case)"
txtvalue="$2"
_info "Using dynv6 API"
_debug fulldomain "$fulldomain"
_debug txtvalue "$txtvalue"
@@ -206,7 +206,7 @@ _get_zone_id() {
return 1
fi
zone_id="$(echo "$response" | tr '}' '\n' | grep "$selected" | tr ',' '\n' | grep id | tr -d '"')"
zone_id="$(echo "$response" | tr '}' '\n' | grep "$selected" | tr ',' '\n' | grep '"id":' | tr -d '"')"
_zone_id="${zone_id#id:}"
_debug "zone id: $_zone_id"
}

View File

@@ -163,6 +163,15 @@ _inwx_check_cookie() {
return 1
}
_htmlEscape() {
_s="$1"
_s=$(echo "$_s" | sed "s/&/&/g")
_s=$(echo "$_s" | sed "s/</\&lt;/g")
_s=$(echo "$_s" | sed "s/>/\&gt;/g")
_s=$(echo "$_s" | sed 's/"/\&quot;/g')
printf -- %s "$_s"
}
_inwx_login() {
if _inwx_check_cookie; then
@@ -170,6 +179,8 @@ _inwx_login() {
return 0
fi
XML_PASS=$(_htmlEscape "$INWX_Password")
xml_content=$(printf '<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>account.login</methodName>
@@ -193,7 +204,7 @@ _inwx_login() {
</value>
</param>
</params>
</methodCall>' "$INWX_User" "$INWX_Password")
</methodCall>' "$INWX_User" "$XML_PASS")
response="$(_post "$xml_content" "$INWX_Api" "" "POST")"

View File

@@ -14,6 +14,8 @@ Options:
# User must provide login data and URL to the ISPConfig installation incl. port.
# The remote user in ISPConfig must have access to:
# - DNS txt Functions
# - DNS zone functions
# - Client functions
######## Public functions #####################

View File

@@ -39,13 +39,15 @@ dns_nsupdate_add() {
[ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_1" ] && nsdebug="-d"
[ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_2" ] && nsdebug="-D"
if [ -z "${NSUPDATE_ZONE}" ]; then
nsupdate -k "${NSUPDATE_KEY}" $nsdebug "${NSUPDATE_OPT}" <<EOF
#shellcheck disable=SC2086
nsupdate -k "${NSUPDATE_KEY}" $nsdebug $NSUPDATE_OPT <<EOF
server ${NSUPDATE_SERVER} ${NSUPDATE_SERVER_PORT}
update add ${fulldomain}. 60 in txt "${txtvalue}"
send
EOF
else
nsupdate -k "${NSUPDATE_KEY}" $nsdebug "${NSUPDATE_OPT}" <<EOF
#shellcheck disable=SC2086
nsupdate -k "${NSUPDATE_KEY}" $nsdebug $NSUPDATE_OPT <<EOF
server ${NSUPDATE_SERVER} ${NSUPDATE_SERVER_PORT}
zone ${NSUPDATE_ZONE}.
update add ${fulldomain}. 60 in txt "${txtvalue}"
@@ -77,13 +79,15 @@ dns_nsupdate_rm() {
[ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_1" ] && nsdebug="-d"
[ -n "$DEBUG" ] && [ "$DEBUG" -ge "$DEBUG_LEVEL_2" ] && nsdebug="-D"
if [ -z "${NSUPDATE_ZONE}" ]; then
nsupdate -k "${NSUPDATE_KEY}" $nsdebug "${NSUPDATE_OPT}" <<EOF
#shellcheck disable=SC2086
nsupdate -k "${NSUPDATE_KEY}" $nsdebug $NSUPDATE_OPT <<EOF
server ${NSUPDATE_SERVER} ${NSUPDATE_SERVER_PORT}
update delete ${fulldomain}. txt
send
EOF
else
nsupdate -k "${NSUPDATE_KEY}" $nsdebug "${NSUPDATE_OPT}" <<EOF
#shellcheck disable=SC2086
nsupdate -k "${NSUPDATE_KEY}" $nsdebug $NSUPDATE_OPT <<EOF
server ${NSUPDATE_SERVER} ${NSUPDATE_SERVER_PORT}
zone ${NSUPDATE_ZONE}.
update delete ${fulldomain}. txt

View File

@@ -1,32 +1,40 @@
#!/usr/bin/env sh
#Support iOS Bark Notification
# Support iOS Bark Notification
#BARK_API_URL="https://api.day.app/xxxx"
#BARK_SOUND="yyyy"
#BARK_GROUP="zzzz"
# Every parameter explained: https://github.com/Finb/bark-server/blob/master/docs/API_V2.md#push
# subject content statusCode
# BARK_API_URL="https://api.day.app/xxxx" (required)
# BARK_GROUP="ACME" (optional)
# BARK_SOUND="alarm" (optional)
# BARK_LEVEL="active" (optional)
# BARK_BADGE=0 (optional)
# BARK_AUTOMATICALLYCOPY="1" (optional)
# BARK_COPY="My clipboard Content" (optional)
# BARK_ICON="https://example.com/icon.png" (optional)
# BARK_ISARCHIVE="1" (optional)
# BARK_URL="https://example.com" (optional)
# subject content statusCode
bark_send() {
_subject="$1"
_content="$2"
_statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped
_statusCode="$3" # 0: success, 1: error, 2: skipped
_debug "_subject" "$_subject"
_debug "_content" "$_content"
_debug "_statusCode" "$_statusCode"
_content=$(echo "$_content" | _url_encode)
_subject=$(echo "$_subject" | _url_encode)
BARK_API_URL="${BARK_API_URL:-$(_readaccountconf_mutable BARK_API_URL)}"
if [ -z "$BARK_API_URL" ]; then
BARK_API_URL=""
_err "You didn't specify a Bark API URL BARK_API_URL yet."
_err "You can download Bark from App Store and get yours."
return 1
fi
_saveaccountconf_mutable BARK_API_URL "$BARK_API_URL"
BARK_SOUND="${BARK_SOUND:-$(_readaccountconf_mutable BARK_SOUND)}"
_saveaccountconf_mutable BARK_SOUND "$BARK_SOUND"
BARK_GROUP="${BARK_GROUP:-$(_readaccountconf_mutable BARK_GROUP)}"
if [ -z "$BARK_GROUP" ]; then
BARK_GROUP="ACME"
@@ -35,10 +43,79 @@ bark_send() {
_saveaccountconf_mutable BARK_GROUP "$BARK_GROUP"
fi
_content=$(echo "$_content" | _url_encode)
_subject=$(echo "$_subject" | _url_encode)
BARK_SOUND="${BARK_SOUND:-$(_readaccountconf_mutable BARK_SOUND)}"
if [ -n "$BARK_SOUND" ]; then
_saveaccountconf_mutable BARK_SOUND "$BARK_SOUND"
fi
response="$(_get "$BARK_API_URL/$_subject/$_content?sound=$BARK_SOUND&group=$BARK_GROUP")"
BARK_LEVEL="${BARK_LEVEL:-$(_readaccountconf_mutable BARK_LEVEL)}"
if [ -n "$BARK_LEVEL" ]; then
_saveaccountconf_mutable BARK_LEVEL "$BARK_LEVEL"
fi
BARK_BADGE="${BARK_BADGE:-$(_readaccountconf_mutable BARK_BADGE)}"
if [ -n "$BARK_BADGE" ]; then
_saveaccountconf_mutable BARK_BADGE "$BARK_BADGE"
fi
BARK_AUTOMATICALLYCOPY="${BARK_AUTOMATICALLYCOPY:-$(_readaccountconf_mutable BARK_AUTOMATICALLYCOPY)}"
if [ -n "$BARK_AUTOMATICALLYCOPY" ]; then
_saveaccountconf_mutable BARK_AUTOMATICALLYCOPY "$BARK_AUTOMATICALLYCOPY"
fi
BARK_COPY="${BARK_COPY:-$(_readaccountconf_mutable BARK_COPY)}"
if [ -n "$BARK_COPY" ]; then
_saveaccountconf_mutable BARK_COPY "$BARK_COPY"
fi
BARK_ICON="${BARK_ICON:-$(_readaccountconf_mutable BARK_ICON)}"
if [ -n "$BARK_ICON" ]; then
_saveaccountconf_mutable BARK_ICON "$BARK_ICON"
fi
BARK_ISARCHIVE="${BARK_ISARCHIVE:-$(_readaccountconf_mutable BARK_ISARCHIVE)}"
if [ -n "$BARK_ISARCHIVE" ]; then
_saveaccountconf_mutable BARK_ISARCHIVE "$BARK_ISARCHIVE"
fi
BARK_URL="${BARK_URL:-$(_readaccountconf_mutable BARK_URL)}"
if [ -n "$BARK_URL" ]; then
_saveaccountconf_mutable BARK_URL "$BARK_URL"
fi
_params=""
if [ -n "$BARK_SOUND" ]; then
_params="$_params&sound=$BARK_SOUND"
fi
if [ -n "$BARK_GROUP" ]; then
_params="$_params&group=$BARK_GROUP"
fi
if [ -n "$BARK_LEVEL" ]; then
_params="$_params&level=$BARK_LEVEL"
fi
if [ -n "$BARK_BADGE" ]; then
_params="$_params&badge=$BARK_BADGE"
fi
if [ -n "$BARK_AUTOMATICALLYCOPY" ]; then
_params="$_params&automaticallyCopy=$BARK_AUTOMATICALLYCOPY"
fi
if [ -n "$BARK_COPY" ]; then
_params="$_params&copy=$BARK_COPY"
fi
if [ -n "$BARK_ICON" ]; then
_params="$_params&icon=$BARK_ICON"
fi
if [ -n "$BARK_ISARCHIVE" ]; then
_params="$_params&isArchive=$BARK_ISARCHIVE"
fi
if [ -n "$BARK_URL" ]; then
_params="$_params&url=$BARK_URL"
fi
_params=$(echo "$_params" | sed 's/^&//') # remove leading '&' if exists
response="$(_get "$BARK_API_URL/$_subject/$_content?$_params")"
if [ "$?" = "0" ] && _contains "$response" "success"; then
_info "Bark API fired success."