Skip to content

Commit

Permalink
Add set -e
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbelgium authored Oct 3, 2023
1 parent ecf0229 commit c55f3c6
Show file tree
Hide file tree
Showing 186 changed files with 194 additions and 8 deletions.
1 change: 1 addition & 0 deletions .templates/00-aaa_dockerfile_backup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

# If dockerfile failed install manually

Expand Down
1 change: 1 addition & 0 deletions .templates/00-banner.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# ==============================================================================
# Displays a simple add-on banner on startup
# ==============================================================================
Expand Down
1 change: 1 addition & 0 deletions .templates/00-global_var.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

###################################
# Export all addon options as env #
Expand Down
1 change: 1 addition & 0 deletions .templates/00-local_mounts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

######################
# MOUNT LOCAL SHARES #
Expand Down
7 changes: 4 additions & 3 deletions .templates/00-smb_mounts.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=

####################
Expand All @@ -20,7 +21,7 @@ if bashio::config.has_value 'networkdisks'; then
####################
# Define variables #
####################

# Set variables
MOREDISKS=$(bashio::config 'networkdisks')
USERNAME=$(bashio::config 'cifsusername')
Expand Down Expand Up @@ -57,7 +58,7 @@ if bashio::config.has_value 'networkdisks'; then
##################
# Mounting disks #
##################

# shellcheck disable=SC2086
for disk in ${MOREDISKS//,/ }; do # Separate comma separated values

Expand Down Expand Up @@ -145,7 +146,7 @@ if bashio::config.has_value 'networkdisks'; then
&& MOUNTED=true && MOUNTOPTIONS="$SMBVERS$SECVERS$PUIDPGID$CHARSET$DOMAIN" || MOUNTED=false
fi
done

fi

# Messages
Expand Down
1 change: 1 addition & 0 deletions .templates/01-custom_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

slug="${HOSTNAME#*-}"
bashio::log.info "Execute /config/addons_autoscripts/${slug}.sh if existing"
Expand Down
1 change: 1 addition & 0 deletions .templates/19-json_repair.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellchek disable=SC2015

JSONTOCHECK='/config/transmission/settings.json'
Expand Down
1 change: 1 addition & 0 deletions .templates/90-config_yaml.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=SC2155,SC1087,SC2163,SC2116,SC2086

##################
Expand Down
1 change: 1 addition & 0 deletions .templates/90-disable_ingress.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

# Disables ingress and sets a default index

Expand Down
1 change: 1 addition & 0 deletions .templates/90-dns_set.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

###############
# DNS SETTING #
Expand Down
1 change: 1 addition & 0 deletions .templates/91-silent.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

###############
# SILENT MODE #
Expand Down
1 change: 1 addition & 0 deletions .templates/91-universal_graphic_drivers.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bashio
set -e

if bashio::config.has_value "graphic_driver"; then

Expand Down
1 change: 1 addition & 0 deletions .templates/99-custom_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
CONFIGSOURCE="$(dirname "${CONFIGSOURCE}")"
Expand Down
1 change: 1 addition & 0 deletions .templates/ha_autoapps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
# shellcheck disable=SC2015
set -e

##############################
# Automatic apps download #
Expand Down
1 change: 1 addition & 0 deletions .templates/ha_automatic_packages.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

########
# INIT #
Expand Down
1 change: 1 addition & 0 deletions .templates/ha_automodules.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
# shellcheck disable=SC2015
set -e

##############################
# Automatic modules download #
Expand Down
1 change: 1 addition & 0 deletions .templates/ha_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
set -e
echo "Starting..."

####################
Expand Down
1 change: 1 addition & 0 deletions .templates/ha_entrypoint_modif.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
set -e

##########################################
# Global modifications before entrypoint #
Expand Down
1 change: 1 addition & 0 deletions .templates/ha_lsio.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh
# shellcheck disable=SC2013,SC2016,SC2236
set -e

#############################
# Modify global lsio images #
Expand Down
5 changes: 3 additions & 2 deletions addons_updater/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

##########
# UPDATE #
Expand Down Expand Up @@ -129,7 +130,7 @@ for f in */; do
jq '.results | .[] | .name' -r |
sed -e '/.*latest.*/d' |
sed -e '/.*dev.*/!d' |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sort -V |
tail -n 1
)
Expand All @@ -140,7 +141,7 @@ for f in */; do
sed -e '/.*latest.*/d' |
sed -e '/.*dev.*/d' |
sed -e '/.*nightly.*/d' |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sed -e "/.*$EXCLUDE_TEXT.*/d" |
sort -V |
tail -n 1
) && \
Expand Down
1 change: 1 addition & 0 deletions arpspoof/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
set -e

# Avoid unbound variables
set +u
Expand Down
1 change: 1 addition & 0 deletions autobrr/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

if [ ! -d /data/autobrr ]; then
echo "Creating /data/autobrr"
Expand Down
1 change: 1 addition & 0 deletions autobrr/rootfs/etc/cont-init.d/32-nginx_ingress.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
1 change: 1 addition & 0 deletions autobrr/rootfs/etc/cont-init.d/91-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

###############
# Start nginx #
Expand Down
1 change: 1 addition & 0 deletions binance-trading-bot/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

if [ -d /config/binance-trading-bot ]; then
echo "Moving to new location /config/addons_config/binance-trading-bot"
Expand Down
1 change: 1 addition & 0 deletions binance-trading-bot/rootfs/etc/cont-init.d/32-ingress.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
1 change: 1 addition & 0 deletions binance-trading-bot/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
set -e

##############
# Export env #
Expand Down
1 change: 1 addition & 0 deletions bitwarden/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
set -e
# ==============================================================================
# Home Assistant Community Add-on: Bitwarden
# This file configures nginx
Expand Down
1 change: 1 addition & 0 deletions bitwarden/rootfs/etc/services.d/bitwarden/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
set -e
# ==============================================================================
# Home Assistant Community Add-on: Bitwarden
# Runs the Vaultwarden server
Expand Down
1 change: 1 addition & 0 deletions bitwarden/rootfs/etc/services.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# ==============================================================================
# Home Assistant Community Add-on: Bitwarden
# Runs the Nginx daemon
Expand Down
1 change: 1 addition & 0 deletions calibre/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=SC2046

# Define user
Expand Down
1 change: 1 addition & 0 deletions calibre/rootfs/etc/cont-init.d/80-configuration.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=SC2015

# Install specific apps
Expand Down
1 change: 1 addition & 0 deletions calibre/rootfs/etc/cont-init.d/90-ingress.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

# nginx Path
NGINX_CONFIG=/etc/nginx/sites-available/ingress.conf
Expand Down
1 change: 1 addition & 0 deletions calibre_web/rootfs/etc/cont-init.d/00-data_location.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

# Define user
PUID=$(bashio::config "PUID")
Expand Down
1 change: 1 addition & 0 deletions calibre_web/rootfs/etc/cont-init.d/32-nginx.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
1 change: 1 addition & 0 deletions calibre_web/rootfs/etc/cont-init.d/80-configuration.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=SC2015

# Set TZ
Expand Down
1 change: 1 addition & 0 deletions calibre_web/rootfs/etc/services.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# ==============================================================================

# Wait for transmission to become available
Expand Down
1 change: 1 addition & 0 deletions changedetection.io/rootfs/etc/cont-init.d/21-folders.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

# Define user
PUID=$(bashio::config "PUID")
Expand Down
1 change: 1 addition & 0 deletions cloudcommander/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
1 change: 1 addition & 0 deletions emby/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

bashio::log.info "Updating folder structure and permission"

Expand Down
1 change: 1 addition & 0 deletions emby/rootfs/etc/cont-init.d/32-nginx.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
1 change: 1 addition & 0 deletions emby/rootfs/etc/cont-init.d/91-silent.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

###############
# SILENT MODE #
Expand Down
1 change: 1 addition & 0 deletions emby/rootfs/etc/services.d/nginx/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# ==============================================================================

# Wait for app to become available
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=SC2155

#####################
Expand Down
1 change: 1 addition & 0 deletions enedisgateway2mqtt/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
set -e

##################
# INITIALIZATION #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

#################
# NGINX SETTING #
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e
# shellcheck disable=SC2155

#####################
Expand Down
1 change: 1 addition & 0 deletions enedisgateway2mqtt_dev/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
set -e

##################
# INITIALIZATION #
Expand Down
1 change: 1 addition & 0 deletions epicgamesfree/rootfs/etc/cont-init.d/20-folders.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
set -e

# Define home
HOME="/config/addons_config/epicgamesfree"
Expand Down
1 change: 1 addition & 0 deletions epicgamesfree/rootfs/etc/cont-init.d/99-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bashio
# shellcheck shell=bash
set -e

##############
# Initialize #
Expand Down
Loading

0 comments on commit c55f3c6

Please sign in to comment.