mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-17 11:30:32 +02:00
remove double commander
This commit is contained in:
@@ -1,35 +0,0 @@
|
|||||||
|
|
||||||
## 0.9.8-1-ls81 (15-12-2021)
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
- New standardized logic for Dockerfile build and packages installation
|
|
||||||
- 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
|
|
||||||
- Removed full_access and host_network
|
|
||||||
|
|
||||||
## 0.8.2-1-ls54 (19-05-2021)
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
|
|
||||||
## 0.8.2-1-ls53 (05-05-2021)
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
|
|
||||||
## 0.8.2-1-ls52 (28-04-2021)
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
|
|
||||||
## 0.8.2-1-ls51
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
|
|
||||||
## 0.8.2-1-ls50
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
|
|
||||||
## 0.8.2-1-ls49
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
|
|
||||||
## 0.8.2-1-ls41
|
|
||||||
|
|
||||||
- Update to latest version from linuxserver/docker-doublecommander
|
|
||||||
- Enables PUID/GUID options
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
#==========================#
|
|
||||||
# ALEXBELGIUM'S DOCKERFILE #
|
|
||||||
#==========================#
|
|
||||||
# _.------.
|
|
||||||
# _.-` ('>.-`"""-.
|
|
||||||
# '.--'` _'` _ .--.)
|
|
||||||
# -' '-.-';` `
|
|
||||||
# ' - _.' ``'--.
|
|
||||||
# '---` .-'""`
|
|
||||||
# /`
|
|
||||||
|
|
||||||
#################
|
|
||||||
# 1 Build Image #
|
|
||||||
#################
|
|
||||||
|
|
||||||
ARG BUILD_FROM
|
|
||||||
ARG BUILD_VERSION
|
|
||||||
FROM ${BUILD_FROM}
|
|
||||||
|
|
||||||
##################
|
|
||||||
# 2 Modify Image #
|
|
||||||
##################
|
|
||||||
|
|
||||||
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 \
|
|
||||||
# MOFIFY DATA PATH
|
|
||||||
&& sed -i "s|config|data|g" /defaults/autostart
|
|
||||||
|
|
||||||
##################
|
|
||||||
# 3 Install apps #
|
|
||||||
##################
|
|
||||||
|
|
||||||
# Add rootfs
|
|
||||||
COPY rootfs/ /
|
|
||||||
|
|
||||||
# Manual apps
|
|
||||||
ENV PACKAGES="jq \
|
|
||||||
samba \
|
|
||||||
smbclient"
|
|
||||||
|
|
||||||
# Automatic apps & bashio
|
|
||||||
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi && \
|
|
||||||
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi && \
|
|
||||||
curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh && \
|
|
||||||
chmod 777 /automatic_packages.sh && \
|
|
||||||
/automatic_packages.sh "${PACKAGES:-}" && \
|
|
||||||
rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
|
|
||||||
|
|
||||||
################
|
|
||||||
# 4 Entrypoint #
|
|
||||||
################
|
|
||||||
|
|
||||||
#RUN chmod 777 /entrypoint.sh
|
|
||||||
#WORKDIR /
|
|
||||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
|
||||||
#CMD [ "/entrypoint.sh" ]
|
|
||||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
|
|
||||||
############
|
|
||||||
# 5 Labels #
|
|
||||||
###########
|
|
||||||
|
|
||||||
ARG BUILD_ARCH
|
|
||||||
ARG BUILD_DATE
|
|
||||||
ARG BUILD_DESCRIPTION
|
|
||||||
ARG BUILD_NAME
|
|
||||||
ARG BUILD_REF
|
|
||||||
ARG BUILD_REPOSITORY
|
|
||||||
ARG BUILD_VERSION
|
|
||||||
LABEL \
|
|
||||||
io.hass.name="${BUILD_NAME}" \
|
|
||||||
io.hass.description="${BUILD_DESCRIPTION}" \
|
|
||||||
io.hass.arch="${BUILD_ARCH}" \
|
|
||||||
io.hass.type="addon" \
|
|
||||||
io.hass.version=${BUILD_VERSION} \
|
|
||||||
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
|
||||||
org.opencontainers.image.title="${BUILD_NAME}" \
|
|
||||||
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
|
||||||
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
|
||||||
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
|
||||||
org.opencontainers.image.licenses="MIT" \
|
|
||||||
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
|
||||||
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
|
||||||
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
|
||||||
org.opencontainers.image.created=${BUILD_DATE} \
|
|
||||||
org.opencontainers.image.revision=${BUILD_REF} \
|
|
||||||
org.opencontainers.image.version=${BUILD_VERSION}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# Home assistant add-on: doublecommander
|
|
||||||
|
|
||||||
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
|
||||||
|
|
||||||
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
|
|
||||||
|
|
||||||
![Supports
|
|
||||||
Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield]
|
|
||||||
|
|
||||||
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
|
|
||||||
|
|
||||||
[](https://github.com/alexbelgium/hassio-addons/stargazers)
|
|
||||||
|
|
||||||
## 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.
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
Webui can be found at `<your-ip>:3000`.
|
|
||||||
|
|
||||||
## 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.
|
|
||||||
|
|
||||||
[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
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#include <tunables/global>
|
|
||||||
|
|
||||||
profile doublecommander_addon flags=(attach_disconnected,mediate_deleted) {
|
|
||||||
#include <abstractions/base>
|
|
||||||
|
|
||||||
capability,
|
|
||||||
file,
|
|
||||||
mount,
|
|
||||||
umount,
|
|
||||||
remount,
|
|
||||||
|
|
||||||
capability setgid,
|
|
||||||
capability setuid,
|
|
||||||
capability sys_admin,
|
|
||||||
capability dac_read_search,
|
|
||||||
# capability dac_override,
|
|
||||||
# capability sys_rawio,
|
|
||||||
|
|
||||||
# S6-Overlay
|
|
||||||
/bin/** ix,
|
|
||||||
/usr/bin/** ix,
|
|
||||||
/usr/lib/bashio/** ix,
|
|
||||||
/etc/s6/** rix,
|
|
||||||
/run/s6/** rix,
|
|
||||||
/etc/services.d/** rwix,
|
|
||||||
/etc/cont-init.d/** rwix,
|
|
||||||
/etc/cont-finish.d/** rwix,
|
|
||||||
/init rix,
|
|
||||||
/var/run/** mrwkl,
|
|
||||||
/var/run/ mrwkl,
|
|
||||||
/dev/i2c-1 mrwkl,
|
|
||||||
# Files required
|
|
||||||
/dev/sda1 mrwkl,
|
|
||||||
/dev/sdb1 mrwkl,
|
|
||||||
/dev/mmcblk0p1 mrwkl,
|
|
||||||
/dev/* mrwkl,
|
|
||||||
/tmp/** mrkwl,
|
|
||||||
|
|
||||||
# Data access
|
|
||||||
/data/** rw,
|
|
||||||
/** rw,
|
|
||||||
|
|
||||||
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
|
||||||
ptrace (trace,read) peer=docker-default,
|
|
||||||
|
|
||||||
# docker daemon confinement requires explict allow rule for signal
|
|
||||||
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"build_from": {
|
|
||||||
"armv7": "linuxserver/doublecommander:arm32v7-latest",
|
|
||||||
"armhf": "linuxserver/doublecommander:arm32v7-latest",
|
|
||||||
"aarch64": "linuxserver/doublecommander:arm64v8-latest",
|
|
||||||
"amd64": "linuxserver/doublecommander:amd64-latest"
|
|
||||||
},
|
|
||||||
"squash": false,
|
|
||||||
"args": {}
|
|
||||||
}
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
{
|
|
||||||
"apparmor": true,
|
|
||||||
"arch": [
|
|
||||||
"aarch64",
|
|
||||||
"amd64",
|
|
||||||
"armv7",
|
|
||||||
"armhf"
|
|
||||||
],
|
|
||||||
"boot": "auto",
|
|
||||||
"description": "Double Commander is a free cross platform open source file manager with two panels side by side.",
|
|
||||||
"environment": {
|
|
||||||
"PUID": "0",
|
|
||||||
"PGID": "0"
|
|
||||||
},
|
|
||||||
"map": [
|
|
||||||
"backup:rw",
|
|
||||||
"config:rw",
|
|
||||||
"share:rw",
|
|
||||||
"media:rw",
|
|
||||||
"ssl"
|
|
||||||
],
|
|
||||||
"name": "Double commander",
|
|
||||||
"options": {
|
|
||||||
"PUID": 0,
|
|
||||||
"PGID": 0,
|
|
||||||
"networkdisks": "<//SERVER/SHARE>",
|
|
||||||
"cifsusername": "<username>",
|
|
||||||
"cifspassword": "<password>"
|
|
||||||
},
|
|
||||||
"ports": {
|
|
||||||
"3000/tcp": 3000
|
|
||||||
},
|
|
||||||
"privileged": [
|
|
||||||
"SYS_ADMIN",
|
|
||||||
"DAC_READ_SEARCH"
|
|
||||||
],
|
|
||||||
"schema": {
|
|
||||||
"PUID": "int",
|
|
||||||
"PGID": "int",
|
|
||||||
"TZ": "str?",
|
|
||||||
"networkdisks": "str?",
|
|
||||||
"cifsusername": "str?",
|
|
||||||
"cifspassword": "str?",
|
|
||||||
"cifsdomain": "str?"
|
|
||||||
},
|
|
||||||
"slug": "doublecommander",
|
|
||||||
"startup": "services",
|
|
||||||
"upstream": "0.9.8-1-ls81",
|
|
||||||
"url": "https://hub.docker.com/r/linuxserver/doublecommander",
|
|
||||||
"version": "0.9.8-1-ls81",
|
|
||||||
"webui": "http://[HOST]:[PORT:3000]"
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB |
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# If dockerfile failed install manually
|
|
||||||
if [ -e "/ENVFILE" ]; then
|
|
||||||
echo "Executing script"
|
|
||||||
PACKAGES=$(</ENVFILE)
|
|
||||||
(
|
|
||||||
#######################
|
|
||||||
# Automatic installer #
|
|
||||||
#######################
|
|
||||||
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash); fi &&
|
|
||||||
if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl); fi &&
|
|
||||||
curl -L -f -s "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/zzz_templates/automatic_packages.sh" --output /automatic_packages.sh &&
|
|
||||||
chmod 777 /automatic_packages.sh &&
|
|
||||||
eval /./automatic_packages.sh "$PACKAGES" &&
|
|
||||||
rm /automatic_packages.sh
|
|
||||||
) >/dev/null
|
|
||||||
|
|
||||||
fi
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
|
||||||
# ==============================================================================
|
|
||||||
# Displays a simple add-on banner on startup
|
|
||||||
# ==============================================================================
|
|
||||||
|
|
||||||
if bashio::supervisor.ping; then
|
|
||||||
bashio::log.blue \
|
|
||||||
'-----------------------------------------------------------'
|
|
||||||
bashio::log.blue " Add-on: $(bashio::addon.name)"
|
|
||||||
bashio::log.blue " $(bashio::addon.description)"
|
|
||||||
bashio::log.blue \
|
|
||||||
'-----------------------------------------------------------'
|
|
||||||
|
|
||||||
bashio::log.blue " Add-on version: $(bashio::addon.version)"
|
|
||||||
if bashio::var.true "$(bashio::addon.update_available)"; then
|
|
||||||
bashio::log.magenta ' There is an update available for this add-on!'
|
|
||||||
bashio::log.magenta \
|
|
||||||
" Latest add-on version: $(bashio::addon.version_latest)"
|
|
||||||
bashio::log.magenta ' Please consider upgrading as soon as possible.'
|
|
||||||
else
|
|
||||||
bashio::log.green ' You are running the latest version of this add-on.'
|
|
||||||
fi
|
|
||||||
|
|
||||||
bashio::log.blue " System: $(bashio::info.operating_system)" \
|
|
||||||
" ($(bashio::info.arch) / $(bashio::info.machine))"
|
|
||||||
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
|
|
||||||
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
|
|
||||||
|
|
||||||
bashio::log.blue \
|
|
||||||
'-----------------------------------------------------------'
|
|
||||||
bashio::log.blue \
|
|
||||||
' Please, share the above information when looking for help'
|
|
||||||
bashio::log.blue \
|
|
||||||
' or support in, e.g., GitHub, forums'
|
|
||||||
bashio::log.green \
|
|
||||||
' https://github.com/alexbelgium/hassio-addons'
|
|
||||||
bashio::log.blue \
|
|
||||||
'-----------------------------------------------------------'
|
|
||||||
fi
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
#!/usr/bin/with-contenv bashio
|
|
||||||
|
|
||||||
#########################
|
|
||||||
# MOUNT SMB SHARES v1.6 #
|
|
||||||
#########################
|
|
||||||
if bashio::config.has_value 'networkdisks'; then
|
|
||||||
|
|
||||||
# Define variables
|
|
||||||
MOREDISKS=$(bashio::config 'networkdisks')
|
|
||||||
CIFS_USERNAME=$(bashio::config 'cifsusername')
|
|
||||||
CIFS_PASSWORD=$(bashio::config 'cifspassword')
|
|
||||||
MOUNTED=false
|
|
||||||
SMBVERS=""
|
|
||||||
SECVERS=""
|
|
||||||
|
|
||||||
# Mount CIFS Share if configured and if Protection Mode is active
|
|
||||||
echo 'Mounting smb share(s)...'
|
|
||||||
|
|
||||||
if bashio::config.has_value 'cifsdomain'; then
|
|
||||||
DOMAIN=",domain=$(bashio::config 'cifsdomain')"
|
|
||||||
else
|
|
||||||
DOMAIN=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Mounting disks
|
|
||||||
for disk in ${MOREDISKS//,/ }; do # Separate comma separated values
|
|
||||||
|
|
||||||
# Clean name of network share
|
|
||||||
disk=$(echo $disk | sed "s,/$,,") # Remove / at end of name
|
|
||||||
diskname=${disk//\\//} #replace \ with /
|
|
||||||
diskname=${diskname##*/} # Get only last part of the name
|
|
||||||
|
|
||||||
# Data validation
|
|
||||||
if [[ ! $disk =~ ^.*+[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[/]+.*+$ ]]; then
|
|
||||||
bashio::log.fatal "The structure of your \"networkdisks\" option : \"$disk\" doesn't seem correct, please use a structure like //123.12.12.12/sharedfolder,//123.12.12.12/sharedfolder2. If you don't use it, you can simply remove the text, this will avoid this error message in the future."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare mount point
|
|
||||||
mkdir -p /mnt/$diskname
|
|
||||||
chown -R root:root /mnt/$diskname
|
|
||||||
|
|
||||||
#Tries to mount with default options
|
|
||||||
mount -t cifs -o rw,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$DOMAIN $disk /mnt/$diskname 2>ERRORCODE && MOUNTED=true || MOUNTED=false
|
|
||||||
|
|
||||||
# if Fail test different smb and sec versions
|
|
||||||
if [ $MOUNTED = false ]; then
|
|
||||||
for SMBVERS in ",vers=3" ",vers=1.0" ",vers=2.1" ",vers=3.0" ",nodfs" ",uid=0,gid=0,forceuid,forcegid" ",noforceuid,noforcegid" ",${DOMAIN:-WORKGROUP}"; do
|
|
||||||
mount -t cifs -o rw,file_mode=0777,dir_mode=0777,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$SMBVERS $disk /mnt/$diskname 2>/dev/null && MOUNTED=true && break || MOUNTED=false
|
|
||||||
for SECVERS in ",sec=ntlmi" ",sec=ntlmv2" ",sec=ntlmv2i" ",sec=ntlmssp" ",sec=ntlmsspi" ",sec=ntlm" ",sec=krb5i" ",sec=krb5" ",iocharset=utf8"; do
|
|
||||||
mount -t cifs -o rw,file_mode=0777,dir_mode=0777,username=$CIFS_USERNAME,password=${CIFS_PASSWORD}$SMBVERS$SECVERS $disk /mnt/$disk name 2>/dev/null && MOUNTED=true && break 2 && break || MOUNTED=false
|
|
||||||
done
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Messages
|
|
||||||
if [ $MOUNTED = true ] && [ "mountpoint -q /mnt/$diskname" ]; then
|
|
||||||
#Test write permissions
|
|
||||||
touch /mnt/$diskname/testaze && rm /mnt/$diskname/testaze &&
|
|
||||||
bashio::log.info "... $disk successfully mounted to /mnt/$diskname with options $SMBVERS$SECVERS" ||
|
|
||||||
bashio::log.fatal "Disk is mounted, however unable to write in the shared disk. Please check UID/GID for permissions, and if the share is rw"
|
|
||||||
|
|
||||||
else
|
|
||||||
# Mounting failed messages
|
|
||||||
bashio::log.fatal "Error, unable to mount $disk to /mnt/$diskname with username $CIFS_USERNAME, $CIFS_PASSWORD. Please check your remote share path, username, password, domain, try putting 0 in UID and GID"
|
|
||||||
bashio::log.fatal "Here is some debugging info :"
|
|
||||||
|
|
||||||
# Provide debugging info
|
|
||||||
smbclient -V &>/dev/null || apt-get install smbclient || apk add --no-cache samba-client
|
|
||||||
#smbclient $disk -U $CIFS_USERNAME%$CIFS_PASSWORD || true
|
|
||||||
smbclient -L $disk -U $CIFS_USERNAME%$CIFS_PASSWORD || true
|
|
||||||
|
|
||||||
# Error code
|
|
||||||
bashio::log.fatal "Error read : $(<ERRORCODE)"
|
|
||||||
rm ERRORCODE
|
|
||||||
|
|
||||||
# clean folder
|
|
||||||
umount /mnt/$diskname 2>/dev/null || true
|
|
||||||
rmdir /mnt/$diskname || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user