mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-05 07:14:08 +02:00
Github bot : script beautyshied
This commit is contained in:
@@ -5,10 +5,10 @@ slug="${HOSTNAME#*-}"
|
|||||||
bashio::log.info "Execute /config/${slug}.sh if existing"
|
bashio::log.info "Execute /config/${slug}.sh if existing"
|
||||||
|
|
||||||
if [ -f /config/"${slug}".sh ]; then
|
if [ -f /config/"${slug}".sh ]; then
|
||||||
bashio::log.info "... script found, executing"
|
bashio::log.info "... script found, executing"
|
||||||
chmod +x /config/"${slug}".sh
|
chmod +x /config/"${slug}".sh
|
||||||
/./config/"${slug}".sh
|
/./config/"${slug}".sh
|
||||||
else
|
else
|
||||||
bashio::log.info "... no script found"
|
bashio::log.info "... no script found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ if bashio::config.has_value 'localdisks'; then
|
|||||||
# Mount
|
# Mount
|
||||||
# shellcheck disable=SC2015
|
# shellcheck disable=SC2015
|
||||||
mount "$devpath"/"$disk" -o "uid=$PUID,gid=$PGID" /mnt/"$disk" && bashio::log.info "Success! $disk mounted to /mnt/$disk" || \
|
mount "$devpath"/"$disk" -o "uid=$PUID,gid=$PGID" /mnt/"$disk" && bashio::log.info "Success! $disk mounted to /mnt/$disk" || \
|
||||||
(mount "$devpath"/"$disk" /mnt/"$disk" && bashio::log.info "Success! $disk mounted to /mnt/$disk") || \
|
(mount "$devpath"/"$disk" /mnt/"$disk" && bashio::log.info "Success! $disk mounted to /mnt/$disk") || \
|
||||||
(bashio::log.fatal "Unable to mount local drives! Please check the name." && rmdir /mnt/$disk)
|
(bashio::log.fatal "Unable to mount local drives! Please check the name." && rmdir /mnt/$disk)
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ chown -R nginx:nginx /data
|
|||||||
|
|
||||||
# Start app
|
# Start app
|
||||||
/./etc/init.d/php8.1-fpm start && \
|
/./etc/init.d/php8.1-fpm start && \
|
||||||
chown -R nginx:nginx /data/Specific && \
|
chown -R nginx:nginx /data/Specific && \
|
||||||
nginx -g "daemon off;"
|
nginx -g "daemon off;"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -f /etc/cont-init.d/92-smb_mounts.sh]; then
|
if [ -f /etc/cont-init.d/92-smb_mounts.sh]; then
|
||||||
sed -i "s|cifs -o \"|cifs -o \"nobrl," /etc/cont-init.d/92-smb_mounts.sh
|
sed -i "s|cifs -o \"|cifs -o \"nobrl," /etc/cont-init.d/92-smb_mounts.sh
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
mkdir -p /config/addons_config/qBittorrent
|
mkdir -p /config/addons_config/qBittorrent
|
||||||
|
|
||||||
if [ -f /config/addons_config/qbittorrent/qBittorrent.conf ] && [ -f /config/addons_config/qBittorrent/qBittorrent.conf ]; then
|
if [ -f /config/addons_config/qbittorrent/qBittorrent.conf ] && [ -f /config/addons_config/qBittorrent/qBittorrent.conf ]; then
|
||||||
echo "Restore folders"
|
echo "Restore folders"
|
||||||
mv /config/addons_config/qBittorrent /config/addons_config/qBittorrent_old
|
mv /config/addons_config/qBittorrent /config/addons_config/qBittorrent_old
|
||||||
mv /config/addons_config/qbittorrent /config/addons_config/qBittorrent
|
mv /config/addons_config/qbittorrent /config/addons_config/qBittorrent
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
|||||||
|
|
||||||
# Check collector
|
# Check collector
|
||||||
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
||||||
echo "export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" >> /env.sh
|
echo "export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" >> /env.sh
|
||||||
sed -i "1a export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" /etc/services.d/collector-once/run
|
sed -i "1a export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" /etc/services.d/collector-once/run
|
||||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||||
else
|
else
|
||||||
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
|||||||
|
|
||||||
# Check collector
|
# Check collector
|
||||||
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
||||||
echo "export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" >> /env.sh
|
echo "export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" >> /env.sh
|
||||||
sed -i "1a export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" /etc/services.d/collector-once/run
|
sed -i "1a export COLLECTOR_API_ENDPOINT=$(bashio::config "COLLECTOR_API_ENDPOINT")" /etc/services.d/collector-once/run
|
||||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||||
else
|
else
|
||||||
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
bashio::exit.nok "Mode is set to 'Collector', but 'COLLECTOR_API_ENDPOINT' is not defined"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user