Github bot : script beautyshied

This commit is contained in:
github-actions
2022-11-20 00:14:21 +00:00
parent 3436f14e09
commit d8f53d05b2
7 changed files with 20 additions and 20 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;"

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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