This commit is contained in:
Alexandre
2021-02-16 15:05:54 +01:00
7 changed files with 43 additions and 23 deletions

View File

@@ -77,10 +77,14 @@ https://github.com/alexbelgium/hassio-addons
- The torrent client for Hass.io.
- Based on https://hub.docker.com/r/linuxserver/transmission
### ✓ [Ubooquity](ubooquity/) ![smb][smb-shield]
- Free, lightweight and easy-to-use home server for your comics and ebooks
- Based on https://hub.docker.com/r/linuxserver/ubooquity
[//]: # (ADDONLIST_END)
[stale-shield]: https://img.shields.io/badge/Stale--orange
[stale-shield]: https://img.shields.io/badge/Stale--orange.svg
[smb-shield]: https://img.shields.io/badge/SMB--green?style=plastic.svg
[sql-shield]: https://img.shields.io/badge/SQL--green
[sql-shield]: https://img.shields.io/badge/SQL-external-orange.svg
[privileged-shield]: https://img.shields.io/badge/privileged-required-orange.svg

View File

@@ -1,7 +1,8 @@
- New configuration option : set download path
- New configuration option : set username for webUI
- New feature : mount smb share in protected mode
- Removed ability to remove protection and mount local hdd, to increase the addon score
- Changed path :cChanged smb mount path from /storage/externalcifs to /mnt/externalcifs
- Removed feature : ability to remove protection and mount local hdd, to increase the addon score
## 14.3.3.99202101191832-7248-da0b276d5ubuntu20.04.1-ls116
- Update to latest version from linuxserver/docker-qbittorrent

View File

@@ -36,11 +36,11 @@ if bashio::config.has_value 'networkdisks'; then
for disk in $MOREDISKS
do
bashio::log.info "Mount ${disk}"
echo "Creating /storage/storagecifs"
mkdir -p /storage/storagecifs
chown -R abc:abc /storage/storagecifs
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \
bashio::log.info "Success!"
echo "Creating /mnt/storagecifs"
mkdir -p /mnt/storagecifs
chown -R abc:abc /mnt/storagecifs
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /mnt/storagecifs && \
bashio::log.info "SMB share was successfully mapped to /mnt/storagecifs"
done || \
bashio::log.warning "Protection mode is ON. Unable to mount external drives!"
fi

View File

@@ -10,7 +10,7 @@ RUN apk add --no-cache \
curl \
jq \
&& curl -J -L -o /tmp/bashio.tar.gz \
"https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \
"https://github.com/hassio-addons/bashio/archive/v0.10.1.tar.gz" \
&& mkdir /tmp/bashio \
&& tar zxvf \
/tmp/bashio.tar.gz \
@@ -20,15 +20,20 @@ RUN apk add --no-cache \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
&& rm -fr /tmp/bashio.tar.gz \
\
# Set config directory
&& sed -i 's|config|config/ubooquity|g' /etc/cont-init.d/10-adduser \
&& sed -i 's|config|config/ubooquity|g' /etc/cont-init.d/30-config \
&& sed -i 's|config|config/ubooquity|g' /etc/services.d/ubooquity/run \
# Allow UID and GID setting
&& sed -i 's/bash/bashio/g' /etc/cont-init.d/10-adduser \
&& sed -i 's/{PUID:-911}/(bashio::config "PUID")/g' /etc/cont-init.d/10-adduser \
&& sed -i 's/{PGID:-911}/(bashio::config "PGID")/g' /etc/cont-init.d/10-adduser \
# # Set default folders
&& sed -i 's|/files|/share/ubooquity/files/|g' /defaults/preferences.json \
&& sed -i 's|bash|bashio|g' /etc/cont-init.d/10-adduser \
&& sed -i 's|{PUID:-911}|(bashio::config "PUID")|g' /etc/cont-init.d/10-adduser \
&& sed -i 's|{PGID:-911}|(bashio::config "PGID")|g' /etc/cont-init.d/10-adduser \
# Set default directory
&& sed -i 's|/files|/share/ubooquity/files|g' /defaults/preferences.json \
&& sed -i 's|/comics|/share/ubooquity/comics|g' /defaults/preferences.json \
&& sed -i 's|/books|/share/ubooquity/books|g' /defaults/preferences.json \
&& sed -i 's|config|config/ubooquity|g' /etc/cont-init.d/30-config \
&& sed -i 's|config|config/ubooquity|g' /etc/services.d/ubooquity/run
# Allow maximum memory setting
&& sed -i 's|bash|bashio|g' /etc/services.d/ubooquity/run \
&& sed -i 's|{MAXMEM:-512}|(bashio::config "maxmem")|g' /etc/services.d/ubooquity/run
VOLUME [ "/data" ]
VOLUME [ "/data" ]

View File

@@ -28,13 +28,14 @@ Network disk is mounted to /share/storagecifs
```yaml
GUID: user
GPID: user
maxmem: 300 # The quantity of memory allocated to Ubooquity depends on the hardware your are running it on. If this quantity is too small, you might sometime saturate it with when performing memory intensive operations. Thats when you get java.lang.OutOfMemoryError: Java heap space errors. You can explicitly set the amount of memory Ubooquity is allowed to use (be careful to set a value lower than the actual physical memory of your hardware). Value is a number of megabytes ( put just a number, without MB )
networkdisks: "<//SERVER/SHARE>" # list of smbv2/3 servers to mount (optional)
cifsusername: "username" # smb username (optional)
cifspassword: "password" # smb password (optional)
```
## Support
Create an issue on github
Create an issue on the [repository github][repository]
[repository]: https://github.com/alexbelgium/hassio-addons
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg

View File

@@ -30,21 +30,22 @@
"share:rw",
"ssl"
],
"webui": "[PROTO:ssl]://[HOST]:[PORT:2202]",
"webui": "[PROTO:ssl]://[HOST]:[PORT:2203]/ubooquity/admin",
"boot": "auto",
"environment": {
"MAXMEM": "512"
},
"options": {
"PUID": 0,
"PGID": 0
"PGID": 0,
"maxmem": 120
},
"schema": {
"PUID": "int",
"PGID": "int",
"maxmem": "int",
"networkdisks": "str?",
"cifsusername": "str?",
"cifspassword": "str?",
"TZ": "str?"
}
}
}

View File

@@ -1,3 +1,11 @@
#!/usr/bin/with-contenv bashio
# Empty
###########
# FOLDERS #
###########
FILES=$(jq ".filesPaths[0].pathString" /config/ubooquity/preferences.json)
COMICS=$(jq ".comicsPaths[0].pathString" /config/ubooquity/preferences.json)
BOOKS=$(jq ".booksPaths[0].pathString" /config/ubooquity/preferences.json)
mkdir -p $FILES $COMICS $BOOKS /config/ubooquity || true
chown -R abc:abc $FILES $COMICS $BOOKS /config/ubooquity || true