diff --git a/doublecommander/CHANGELOG.md b/doublecommander/CHANGELOG.md new file mode 100644 index 000000000..cb9396a86 --- /dev/null +++ b/doublecommander/CHANGELOG.md @@ -0,0 +1,4 @@ +## 0.8.2-1-ls41 +- Update to latest version from linuxserver/docker-doublecommander + +- Enables PUID/GUID options diff --git a/doublecommander/Dockerfile b/doublecommander/Dockerfile new file mode 100644 index 000000000..cef8d7bfd --- /dev/null +++ b/doublecommander/Dockerfile @@ -0,0 +1,34 @@ +ARG BUILD_FROM +ARG BUILD_VERSION + +FROM ${BUILD_FROM}${BUILD_VERSION} + +# Install bashio +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + jq \ + && curl -J -L -o /tmp/bashio.tar.gz \ + "https://github.com/hassio-addons/bashio/archive/v0.7.1.tar.gz" \ + && mkdir /tmp/bashio \ + && tar zxvf \ + /tmp/bashio.tar.gz \ + --strip 1 -C /tmp/bashio \ + \ + && mv /tmp/bashio/lib /usr/lib/bashio \ + && ln -s /usr/lib/bashio/bashio /usr/bin/bashio \ + && rm -fr \ + /tmp/* \ + /var/{cache,log}/* \ + /var/lib/apt/lists/* \ + # 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 + +# copy local files +COPY root/ / + +# MOFIFY DATA PATH +RUN sed -i "s|config|data|g" /defaults/autostart + +VOLUME [ "/data" ] diff --git a/doublecommander/README.md b/doublecommander/README.md new file mode 100644 index 000000000..32fb67a28 --- /dev/null +++ b/doublecommander/README.md @@ -0,0 +1,32 @@ +# Home assistant add-on: doublecommander +![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield] + +## 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 +[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg +[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg +[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg +[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg diff --git a/doublecommander/build.json b/doublecommander/build.json new file mode 100644 index 000000000..efa69b319 --- /dev/null +++ b/doublecommander/build.json @@ -0,0 +1,10 @@ +{ + "build_from": { + "armv7": "linuxserver/doublecommander:arm32v7-", + "armhf": "linuxserver/doublecommander:arm32v7-", + "aarch64": "linuxserver/doublecommander:arm64v8-", + "amd64": "linuxserver/doublecommander:amd64-" + }, + "squash": false, + "args": {} +} diff --git a/doublecommander/config.json b/doublecommander/config.json new file mode 100644 index 000000000..66d4dc4b5 --- /dev/null +++ b/doublecommander/config.json @@ -0,0 +1,57 @@ +{ + "name": "Double commander", + "version": "0.8.2-1-ls48", + "slug": "doublecommander", + "description": "Double Commander is a free cross platform open source file manager with two panels side by side.", + "url": "https://hub.docker.com/r/linuxserver/doublecommander", + "startup": "services", + "arch": [ + "aarch64", + "amd64", + "armv7", + "armhf" + ], + "ports": { + "3000/tcp": 3000 + }, + "map": [ + "backup:rw", + "config:rw", + "share:rw", + "media:rw", + "ssl" + ], + "webui": "http://[HOST]:[PORT:3000]", + "boot": "auto", + "privileged": [ + "SYS_ADMIN", + "DAC_READ_SEARCH" + ], + "host_network": true, + "full_access": true, + "environment": { + "PUID": "0", + "PGID": "0" + }, + "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/doublecommander/icon.png b/doublecommander/icon.png new file mode 100644 index 000000000..6a349d9a1 Binary files /dev/null and b/doublecommander/icon.png differ diff --git a/doublecommander/logo.png b/doublecommander/logo.png new file mode 100644 index 000000000..6a349d9a1 Binary files /dev/null and b/doublecommander/logo.png differ diff --git a/doublecommander/root/etc/cont-init.d/50-mounts b/doublecommander/root/etc/cont-init.d/50-mounts new file mode 100644 index 000000000..e7fb49d35 --- /dev/null +++ b/doublecommander/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