mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01: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"
|
||||
|
||||
if [ -f /config/"${slug}".sh ]; then
|
||||
bashio::log.info "... script found, executing"
|
||||
chmod +x /config/"${slug}".sh
|
||||
/./config/"${slug}".sh
|
||||
bashio::log.info "... script found, executing"
|
||||
chmod +x /config/"${slug}".sh
|
||||
/./config/"${slug}".sh
|
||||
else
|
||||
bashio::log.info "... no script found"
|
||||
bashio::log.info "... no script found"
|
||||
fi
|
||||
|
||||
|
||||
@@ -45,8 +45,8 @@ if bashio::config.has_value 'localdisks'; then
|
||||
# Mount
|
||||
# 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" /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)
|
||||
(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)
|
||||
|
||||
done
|
||||
|
||||
|
||||
@@ -8,5 +8,5 @@ chown -R nginx:nginx /data
|
||||
|
||||
# Start app
|
||||
/./etc/init.d/php8.1-fpm start && \
|
||||
chown -R nginx:nginx /data/Specific && \
|
||||
nginx -g "daemon off;"
|
||||
chown -R nginx:nginx /data/Specific && \
|
||||
nginx -g "daemon off;"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
mkdir -p /config/addons_config/qBittorrent
|
||||
|
||||
if [ -f /config/addons_config/qbittorrent/qBittorrent.conf ] && [ -f /config/addons_config/qBittorrent/qBittorrent.conf ]; then
|
||||
echo "Restore folders"
|
||||
mv /config/addons_config/qBittorrent /config/addons_config/qBittorrent_old
|
||||
mv /config/addons_config/qbittorrent /config/addons_config/qBittorrent
|
||||
echo "Restore folders"
|
||||
mv /config/addons_config/qBittorrent /config/addons_config/qBittorrent_old
|
||||
mv /config/addons_config/qbittorrent /config/addons_config/qBittorrent
|
||||
fi
|
||||
|
||||
@@ -16,11 +16,11 @@ if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
||||
|
||||
# Check collector
|
||||
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
||||
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
|
||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||
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
|
||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||
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
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ if [[ "$(bashio::config "Mode")" == Collector ]]; then
|
||||
|
||||
# Check collector
|
||||
if bashio::config.has_value "COLLECTOR_API_ENDPOINT"; then
|
||||
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
|
||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||
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
|
||||
bashio::log.info "Using 'COLLECTOR_API_ENDPOINT' $(bashio::config "COLLECTOR_API_ENDPOINT")"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user