mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-20 19:48:11 +01:00
Github bot : script beautyshied
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -67,19 +67,19 @@ if bashio::config.has_value "SMARTCTL_COMMAND_DEVICE_TYPE"; then
|
||||
if ! bashio::config.has_value "SMARTCTL_MEGARAID_DISK_NUM"; then
|
||||
megaraid_disk_num="$(bashio::config 'SMARTCTL_MEGARAID_DISK_NUM')"
|
||||
{
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type}'"
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type}'"
|
||||
} > /opt/scrutiny/config/collector.yaml
|
||||
else
|
||||
{
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
} > /opt/scrutiny/config/collector.yaml
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
#########################
|
||||
|
||||
if bashio::config.true "expose_collector"; then
|
||||
bashio::log.info "collector.yaml exposed in /share/scrutiny. It will only be accessible if the addon is running"
|
||||
mkdir -p /share/scrutiny
|
||||
cp -rnf /data/config/collector.yaml /share/scrutiny || true
|
||||
rm -R /data/config/collector.yaml
|
||||
ln -s /share/scrutiny/collector.yaml /data/config
|
||||
chmod 777 -R /share/scrutiny
|
||||
bashio::log.info "collector.yaml exposed in /share/scrutiny. It will only be accessible if the addon is running"
|
||||
mkdir -p /share/scrutiny
|
||||
cp -rnf /data/config/collector.yaml /share/scrutiny || true
|
||||
rm -R /data/config/collector.yaml
|
||||
ln -s /share/scrutiny/collector.yaml /data/config
|
||||
chmod 777 -R /share/scrutiny
|
||||
fi
|
||||
|
||||
########
|
||||
|
||||
@@ -72,19 +72,19 @@ if bashio::config.has_value "SMARTCTL_COMMAND_DEVICE_TYPE"; then
|
||||
if ! bashio::config.has_value "SMARTCTL_MEGARAID_DISK_NUM"; then
|
||||
megaraid_disk_num="$(bashio::config 'SMARTCTL_MEGARAID_DISK_NUM')"
|
||||
{
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type}'"
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type}'"
|
||||
} > /opt/scrutiny/config/collector.yaml
|
||||
else
|
||||
{
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo "commands:"
|
||||
echo " metrics_smartctl_bin: '/usr/sbin/smartctl'"
|
||||
echo " metrics_scan_args: '--scan --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_info_args: '--info --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
echo " metrics_smart_args: '--xall --json --dev ${device_type},${megaraid_disk_num}'"
|
||||
} > /opt/scrutiny/config/collector.yaml
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user