Skip to content

Commit

Permalink
Minor tweaks, don't set -e until after Docker checks, add version banner
Browse files Browse the repository at this point in the history
  • Loading branch information
ubergeek77 committed Jun 21, 2023
1 parent b4bea49 commit f0a3d7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LEMMY_HOSTNAME="example.com"

# If you use Cloudflare, your Cloudflare API token. Otherwise leave blank.
# If present, the DNS-01 challenge will be used to obtain valid HTTPS certificates
# This is useful if you use the Cloudflare proxy. Do not forget to choose the Full (Strict) SSL mode!
# --> If you use the Cloudflare Proxy, DO NOT FORGET to enable Cloudflare's Full (Strict) SSL mode! <--
# **This token must have access to edit the Zone where $LEMMY_HOSTNAME is**
# Using this option will increase build time, as the DNS plugin needs to be compiled. Subsequent deploys will be faster.
CF_API_TOKEN=""
Expand Down
13 changes: 7 additions & 6 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

LED_CURRENT_VERSION="1.0.9"
LED_CURRENT_VERSION="1.1.0"

# cd to the directory the script is in
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
Expand Down Expand Up @@ -85,7 +85,6 @@ get_service_status() {
unset CONTAINER_ID
unset SVC_STATUS
loop_n=$((loop_n + 1))
# Change to the ./live folder first,
CONTAINER_ID="$($COMPOSE_CMD -p "lemmy-easy-deploy" ps -q $1)"
if [ $? -ne 0 ]; then
sleep 5
Expand Down Expand Up @@ -214,9 +213,6 @@ if ((LED_CURRENT_VERSION_NUMERIC < LED_UPDATE_CHECK_NUMERIC)); then
echo "================================================================"
fi

# Exit on error
set -e

# parse arguments
while (("$#")); do
case "$1" in
Expand Down Expand Up @@ -255,12 +251,14 @@ while (("$#")); do
esac
done

echo "========================================"
echo "Lemmy-Easy-Deploy by ubergeek77 (v${LED_CURRENT_VERSION})"
echo "========================================"
echo ""
detect_runtime

# If the runtime state is bad, we can't continue
if [[ "${RUNTIME_STATE}" != "OK" ]]; then
echo >&2 ""
echo >&2 "ERROR: Docker runtime not healthy."
echo >&2 "Something is wrong with your Docker installation."
echo >&2 "Please ensure you can run the following command on your own without errors:"
Expand All @@ -273,6 +271,9 @@ if [[ "${RUNTIME_STATE}" != "OK" ]]; then
exit 1
fi

# Exit on error
set -e

# Yell at the user if they didn't follow instructions
if [[ ! -f "./config.env" ]]; then
echo >&2 "ERROR: ./config.env not found! Did you copy the example config?"
Expand Down

0 comments on commit f0a3d7d

Please sign in to comment.