duckdns misc
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
|
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
cp -f .env.example .env
|
cp -f "$thisdir/.env.example" "$thisdir/.env"
|
||||||
|
|
||||||
cat <<EOF | sudo tee /etc/cron.d/duckdns && crontab -u "$(whoami)" /etc/cron.d/duckdns
|
cat <<EOF | sudo tee /etc/cron.d/duckdns && crontab -u "$(whoami)" /etc/cron.d/duckdns
|
||||||
# ------------- Minute (0 - 59)
|
# ------------- Minute (0 - 59)
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
|
|
||||||
[ ! -f .env ] && {
|
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
|
||||||
|
|
||||||
|
[ ! -f "$thisdir/.env" ] && {
|
||||||
echo "ERROR: .env not exists"
|
echo "ERROR: .env not exists"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
source .env
|
source "$thisdir/.env"
|
||||||
|
|
||||||
[ -z "$DUCK_TOKEN" ] && {
|
[ -z "$DUCK_TOKEN" ] && {
|
||||||
echo "ERROR: env var DUCK_TOKEN not specified"
|
echo "ERROR: env var DUCK_TOKEN not specified"
|
||||||
|
|||||||
Reference in New Issue
Block a user