1
0
mirror of synced 2025-12-18 13:22:16 +01:00

Update run

This commit is contained in:
d-two
2023-08-31 13:36:58 +02:00
committed by GitHub
parent 2634460f63
commit 7cdd7d2f49

View File

@@ -5,5 +5,29 @@
# Runs the ps3netsrv
# ==============================================================================
bashio::log.info "Starting Ps3NetSrv.... (Share)"
exec ps3netsrv /mnt/Share
if bashio::config.has_value 'networkdisks'; then
# Define variables
MOREDISKS=$(bashio::config 'networkdisks')
# Clean data
MOREDISKS=${MOREDISKS// \/\//,\/\/}
MOREDISKS=${MOREDISKS//, /,}
MOREDISKS=${MOREDISKS// /"\040"}
# Mounting disks
# shellcheck disable=SC2086
for disk in ${MOREDISKS//,/ }; do # Separate comma separated values
# Clean name of network share
# shellcheck disable=SC2116,SC2001
disk=$(echo $disk | sed "s,/$,,") # Remove / at end of name
disk="${disk//"\040"/ }" #replace \040 with
diskname="${disk//\\//}" #replace \ with /
diskname="${diskname##*/}" # Get only last part of the name
bashio::log.info "Starting Ps3NetSrv.... ($diskname)"
exec ps3netsrv /mnt/"$diskname"
break
done
fi