mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-22 00:31:51 +02:00
Cleanup
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do
|
||||
printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k
|
||||
done
|
||||
@@ -1,70 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [ ! -d /jellyfin ]; then
|
||||
echo "Creating /jellyfin"
|
||||
mkdir -p /jellyfin
|
||||
chown -R abc:abc /jellyfin
|
||||
fi
|
||||
|
||||
if [ ! -d /share/jellyfin ]; then
|
||||
echo "Creating /share/jellyfin"
|
||||
mkdir -p /share/jellyfin
|
||||
chown -R abc:abc /share/jellyfin
|
||||
fi
|
||||
|
||||
if [ ! -d /config/jellyfin ]; then
|
||||
echo "Creating /config/jellyfin"
|
||||
mkdir -p /config/jellyfin
|
||||
chown -R abc:abc /config/jellyfin
|
||||
fi
|
||||
|
||||
# links
|
||||
|
||||
if [ ! -d /jellyfin/cache ]; then
|
||||
echo "Creating link for /jellyfin/cache"
|
||||
mkdir -p /share/jellyfin/cache
|
||||
chown -R abc:abc /share/jellyfin/cache
|
||||
ln -s /share/jellyfin/cache /jellyfin/cache
|
||||
fi
|
||||
|
||||
if [ ! -d /jellyfin/config ]; then
|
||||
echo "Creating link for /jellyfin/config"
|
||||
mkdir -p /config/jellyfin
|
||||
chown -R abc:abc /config/jellyfin
|
||||
ln -s /config/jellyfin /jellyfin/config
|
||||
fi
|
||||
|
||||
if [ ! -d /jellyfin/data ]; then
|
||||
echo "Creating link for /jellyfin/data"
|
||||
mkdir -p /share/jellyfin/data
|
||||
chown -R abc:abc /share/jellyfin/data
|
||||
ln -s /share/jellyfin/data /jellyfin/data
|
||||
fi
|
||||
|
||||
if [ ! -d /jellyfin/logs ]; then
|
||||
echo "Creating link for /jellyfin/logs"
|
||||
mkdir -p /share/jellyfin/logs
|
||||
chown -R abc:abc /share/jellyfin/logs
|
||||
ln -s /share/jellyfin/logs /jellyfin/logs
|
||||
fi
|
||||
|
||||
if [ ! -d /jellyfin/metadata ]; then
|
||||
echo "Creating link for /jellyfin/metadata"
|
||||
mkdir -p /share/jellyfin/metadata
|
||||
chown -R abc:abc /share/jellyfin/metadata
|
||||
ln -s /share/jellyfin/metadata /jellyfin/metadata
|
||||
fi
|
||||
|
||||
if [ ! -d /jellyfin/plugins ]; then
|
||||
echo "Creating link for /jellyfin/plugins"
|
||||
mkdir -p /share/jellyfin/plugins
|
||||
chown -R abc:abc /share/jellyfin/plugins
|
||||
ln -s /share/jellyfin/plugins /jellyfin/plugins
|
||||
fi
|
||||
|
||||
if [ ! -d /jellyfin/root ]; then
|
||||
echo "Creating link for /jellyfin/root"
|
||||
mkdir -p /share/jellyfin/root
|
||||
chown -R abc:abc /share/jellyfin/root
|
||||
ln -s /share/jellyfin/root /jellyfin/root
|
||||
fi
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
#!/usr/bin/with-contenv bashio
|
||||
bashio::log.info 'Mounting external hdd...'
|
||||
|
||||
# Mount local Share if configured and if Protection Mode is active
|
||||
if bashio::config.has_value 'localdisks'; then
|
||||
MOREDISKS=$(bashio::config 'localdisks')
|
||||
bashio::log.info "Local Disks mounting.. ${MOREDISKS}" && \
|
||||
for disk in $MOREDISKS
|
||||
do
|
||||
bashio::log.info "Mount ${disk}"
|
||||
mkdir -p /share/storage && \
|
||||
if [ ! -d /share/storage ]; then
|
||||
echo "Creating /share/storage"
|
||||
mkdir -p /share/storage
|
||||
chown -R abc:abc /share/storage
|
||||
fi
|
||||
|
||||
mount $disk /share/storage && \
|
||||
bashio::log.info "Success!"
|
||||
done || \
|
||||
bashio::log.warning "Protection mode is ON. Unable to mount local drives!"
|
||||
fi
|
||||
|
||||
# Mount CIFS Share if configured and if Protection Mode is active
|
||||
if bashio::config.has_value 'networkdisks'; then
|
||||
MOREDISKS=$(bashio::config 'networkdisks')
|
||||
CIFS_USERNAME=$(bashio::config 'cifsusername')
|
||||
CIFS_PASSWORD=$(bashio::config 'cifspassword')
|
||||
bashio::log.info "Network Disks mounting.. ${MOREDISKS}" && \
|
||||
for disk in $MOREDISKS
|
||||
do
|
||||
bashio::log.info "Mount ${disk}"
|
||||
mkdir -p /share/storagecifs && \
|
||||
if [ ! -d /share/storagecifs ]; then
|
||||
echo "Creating /share/storagecifs"
|
||||
mkdir -p /share/storagecifs
|
||||
chown -R abc:abc /share/storagecifs
|
||||
fi
|
||||
|
||||
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /share/storagecifs && \
|
||||
bashio::log.info "Success!"
|
||||
done || \
|
||||
bashio::log.warning "Protection mode is ON. Unable to mount external drives!"
|
||||
fi
|
||||
Reference in New Issue
Block a user