diff --git a/beets/Dockerfile b/beets/Dockerfile new file mode 100644 index 000000000..ffc1d4505 --- /dev/null +++ b/beets/Dockerfile @@ -0,0 +1,10 @@ +ARG BUILD_FROM +FROM $BUILD_FROM + +# copy local files +COPY root/ / + +# MOFIFY DATA PATH +RUN sed -i "s|config|data|g" /etc/services.d/beets/run + +VOLUME [ "/data" ] diff --git a/beets/README.md b/beets/README.md new file mode 100644 index 000000000..983fb43c2 --- /dev/null +++ b/beets/README.md @@ -0,0 +1,27 @@ +# Hassio Add-ons by alexbelgium: doublecommander + +## About + +Double Commander is a free cross platform open source file manager with two panels side by side. It is inspired by Total Commander and features some new ideas. + +This addon is based on the [docker image](https://github.com/linuxserver/docker-doublecommander) from linuxserver.io. + +## Installation + +The installation of this add-on is pretty straightforward and not different in +comparison to installing any other Hass.io add-on. + +1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance. +1. Install this add-on. +1. Click the `Save` button to store your configuration. +1. Start the 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 `:3000`. + + +[repository]: https://github.com/alexbelgium/hassio-addons diff --git a/beets/build.json b/beets/build.json new file mode 100644 index 000000000..bb7192d07 --- /dev/null +++ b/beets/build.json @@ -0,0 +1,14 @@ +{ + "build_from_template": { + "image": "linuxserver/beets", + "version": "latest" + }, + "build_from": { + "armv7": "linuxserver/beets:arm32v7-latest", + "armhf": "linuxserver/beets:arm32v7-latest", + "aarch64": "linuxserver/beets:arm64v8-latest", + "amd64": "linuxserver/beets:amd64-latest" + }, + "squash": false, + "args": {} +} diff --git a/beets/config.json b/beets/config.json index 8b1378917..5b5ad54d2 100644 --- a/beets/config.json +++ b/beets/config.json @@ -1 +1,45 @@ - +{ + "name": "Beets", + "version": "1.0", + "slug": "beets", + "description": "Beets is a music library manager and not, for the most part, a music player.", + "url": "https://github.com/alexbelgium/hassio-addons/doublecommander", + "startup": "services", + "arch": [ + "aarch64", + "amd64", + "armv7", + "armhf" + ], + "ports": { + "8337/tcp": 8337 + }, + "map": [ + "backup:rw", + "config:rw", + "share:rw", + "media:rw", + "ssl" + ], + "webui": "http://[HOST]:[PORT:8337]", + "boot": "auto", + "privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"], + "full_access": true, + "options": { + "PUID": "0", + "PGID": "0", + "localdisks": ["-sda1"], + "networkdisks": "", + "cifsusername": "", + "cifspassword": "" + }, + "schema": { + "PUID": "int", + "PGID": "int", + "TZ": "str?", + "localdisks": ["str"], + "networkdisks": "str", + "cifsusername": "str", + "cifspassword": "str" + } + } diff --git a/beets/icon.png b/beets/icon.png new file mode 100644 index 000000000..6a349d9a1 Binary files /dev/null and b/beets/icon.png differ diff --git a/beets/logo.png b/beets/logo.png new file mode 100644 index 000000000..6a349d9a1 Binary files /dev/null and b/beets/logo.png differ diff --git a/beets/root/etc/cont-init.d/50-mounts b/beets/root/etc/cont-init.d/50-mounts new file mode 100644 index 000000000..e7fb49d35 --- /dev/null +++ b/beets/root/etc/cont-init.d/50-mounts @@ -0,0 +1,43 @@ +#!/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/$disk && \ + if [ ! -d /share/$disk ]; then + echo "Creating /share/$disk" + mkdir -p /share/$disk + chown -R abc:abc /share/$disk + fi + mount /dev/$disk /share/$disk && \ + 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 /storage/storagecifs ]; then + echo "Creating /storage/storagecifs" + mkdir -p /storage/storagecifs + chown -R abc:abc /storage/storagecifs + fi + + mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \ + bashio::log.info "Success!" + done || \ + bashio::log.warning "Protection mode is ON. Unable to mount external drives!" +fi diff --git a/doublecommander/config.json b/doublecommander/config.json index 6a904d8ec..df7ee6d93 100644 --- a/doublecommander/config.json +++ b/doublecommander/config.json @@ -1,6 +1,6 @@ { "name": "Double commander", - "version": "1.2", + "version": "1.3", "slug": "doublecommander", "description": "Double Commander is a free cross platform open source file manager with two panels side by side.", "url": "https://github.com/alexbelgium/hassio-addons/doublecommander", @@ -29,6 +29,21 @@ "PUID": "0", "PGID": "0" }, - "options": {}, - "schema": {} + "options": { + "PUID": "0", + "PGID": "0", + "localdisks": ["-sda1"], + "networkdisks": "", + "cifsusername": "", + "cifspassword": "" + }, + "schema": { + "PUID": "int", + "PGID": "int", + "TZ": "str?", + "localdisks": ["str"], + "networkdisks": "str", + "cifsusername": "str", + "cifspassword": "str" + } }