improvements

This commit is contained in:
Alexandre
2021-12-04 16:11:15 +01:00
parent cb988c8649
commit 66999b55ab
8 changed files with 80 additions and 13 deletions

View File

@@ -26,6 +26,18 @@ This addon is based on the [docker image](https://github.com/linuxserver/docker-
Webui can be found at `<your-ip>:8096`.
```yaml
GUID: user
GPID: user
TZ: timezone
localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS...
networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas
cifsusername: "username" # optional, smb username, same for all smb shares
cifspassword: "password" # optional, smb password
cifsdomain: "domain" # optional, allow setting the domain for the smb share
silent: true #suppresses debug messages
```
## Installation
The installation of this add-on is pretty straightforward and not different in

View File

@@ -77,6 +77,7 @@
"networkdisks": "str?",
"cifsusername": "str?",
"cifspassword": "str?",
"cifsdomain": "str?",
"smbv1": "bool?",
"silent": "bool?"
},

View File

@@ -1,3 +1,4 @@
- Add local mount (see readmeà
- Added watchdog feature
- Allow mounting of devices up to sdg2
- Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename

View File

@@ -13,15 +13,25 @@ _Thanks to everyone having starred my repo! To star it click on the image below,
## About
Forked to add latest beta versions, smb and local hdd mount.
- Inital version : https://github.com/petersendev/hassio-addons
- CIFS code : https://github.com/dianlight/hassio-addons
[jellyfin](https://jellyfin.media/) organizes video, music, live TV, and photos from personal media libraries and streams them to smart TVs, streaming boxes and mobile devices. This container is packaged as a standalone jellyfin Media Server.
This addon is based on the [docker image](https://github.com/linuxserver/docker-jellyfin) from linuxserver.io.
## Configuration
Webui can be found at `<your-ip>:8096`.
```yaml
GUID: user
GPID: user
TZ: timezone
localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS...
networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas
cifsusername: "username" # optional, smb username, same for all smb shares
cifspassword: "password" # optional, smb password
cifsdomain: "domain" # optional, allow setting the domain for the smb share
```
## Installation
The installation of this add-on is pretty straightforward and not different in
@@ -34,10 +44,6 @@ comparison to installing any other Hass.io add-on.
1. Check the logs of the add-on to see if everything went well.
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
## Configuration
Webui can be found at `<your-ip>:8096`.
[smb-shield]: https://img.shields.io/badge/SMB--green?style=plastic.svg
[repository]: https://github.com/alexbelgium/hassio-addons
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg

View File

@@ -67,9 +67,11 @@
"PUID": "int",
"PGID": "int",
"TZ": "str?",
"localdisks": "str?",
"networkdisks": "str?",
"cifsusername": "str?",
"cifspassword": "str?",
"cifsdomain": "str?",
"smbv1": "bool?"
},
"slug": "jellyfin",

View File

@@ -0,0 +1,32 @@
#!/usr/bin/with-contenv bashio
######################
# MOUNT LOCAL SHARES #
######################
# Mount local Share if configured
if bashio::config.has_value 'localdisks'; then
MOREDISKS=$(bashio::config 'localdisks')
echo "Local Disks mounting..."
# Separate comma separated values
for disk in ${MOREDISKS//,/ }; do
# Mount by device as default
devpath=/dev
# Mount as label
[ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label
# Creates dir
mkdir -p /mnt/$disk
chown -R $(id -u):$(id -g) /mnt/$disk
# Legacy mounting : mount to share if still exists (avoid breaking changes)
[ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true
# Mount
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
fi

View File

@@ -22,6 +22,22 @@ Forked to add latest beta versions, smb and local hdd mount.
This addon is based on the [docker image](https://github.com/linuxserver/docker-plex) from linuxserver.io.
## Configuration
Webui can be found at `<your-ip>:8096`.
```yaml
GUID: user
GPID: user
TZ: timezone
claim: claim code for plex server # see https://github.com/linuxserver/docker-plex
localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS...
networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas
cifsusername: "username" # optional, smb username, same for all smb shares
cifspassword: "password" # optional, smb password
cifsdomain: "domain" # optional, allow setting the domain for the smb share
```
## Installation
The installation of this add-on is pretty straightforward and not different in
@@ -34,10 +50,6 @@ comparison to installing any other Hass.io add-on.
1. Check the logs of the add-on to see if everything went well.
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
## Configuration
Webui can be found at `<your-ip>:8096`.
[smb-shield]: https://img.shields.io/badge/SMB--green?style=plastic.svg
[repository]: https://github.com/alexbelgium/hassio-addons
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg

View File

@@ -94,6 +94,7 @@
"networkdisks": "str?",
"cifsusername": "str?",
"cifspassword": "str?",
"cifsdomain": "str?",
"smbv1": "bool?"
},
"slug": "plex_nas",