mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
musicbrainz picard
This commit is contained in:
0
musicbrainz_picard/CHANGELOG.md
Normal file
0
musicbrainz_picard/CHANGELOG.md
Normal file
32
musicbrainz_picard/Dockerfile
Normal file
32
musicbrainz_picard/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
ARG BUILD_FROM
|
||||
# hadolint ignore=DL3006
|
||||
FROM $BUILD_FROM
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update \
|
||||
\
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
jq=1.5+dfsg-2 \
|
||||
\
|
||||
&& apt-get -y upgrade cifs-utils \
|
||||
&& 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/*
|
||||
|
||||
# copy local files
|
||||
COPY root/ /
|
||||
|
||||
RUN sed -i "s|/config|/musicbrainz_picard|g" /etc/services.d/dbus/run
|
||||
|
||||
25
musicbrainz_picard/README.md
Normal file
25
musicbrainz_picard/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Hassio Add-ons by alexbelgium: Musicbrainz picard
|
||||
|
||||
## About
|
||||
|
||||
This addon is based on the [docker image](https://github.com/linuxserver/docker-Musicbrainz picard) 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 `<your-ip>:8096`.
|
||||
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
7
musicbrainz_picard/build.json
Normal file
7
musicbrainz_picard/build.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"build_from": {
|
||||
"armv7": "mikenye/picard:latest"
|
||||
},
|
||||
"squash": false,
|
||||
"args": {}
|
||||
}
|
||||
50
musicbrainz_picard/config.json
Normal file
50
musicbrainz_picard/config.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "Musicbrainz Picard",
|
||||
"version": "1.0",
|
||||
"slug": "musicbrainz_picard",
|
||||
"legacy": false,
|
||||
"maintenance": {
|
||||
"github_release": "https://github.com/mikenye/docker-picard/tree",
|
||||
"version_regex": "(\\d+\\.\\d+\\.\\d+.\\d+)-(ls\\d+)"
|
||||
},
|
||||
"description": "A Free Software Media System that puts you in control of managing and streaming your media.",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/musicbrainz_picard#readme",
|
||||
"startup": "services",
|
||||
"arch": [
|
||||
"armv7"
|
||||
],
|
||||
"ports": {
|
||||
"5050/tcp": 5050
|
||||
},
|
||||
"ports_description": {
|
||||
"5050/tcp": "web interface"
|
||||
},
|
||||
"map": [
|
||||
"config:rw",
|
||||
"share:rw",
|
||||
"media:rw",
|
||||
"ssl"
|
||||
],
|
||||
"webui": "http://[HOST]:[PORT:5050]",
|
||||
"boot": "auto",
|
||||
"privileged": ["SYS_ADMIN", "DAC_READ_SEARCH"],
|
||||
"full_access": true,
|
||||
"options": {
|
||||
"PUID": 1001,
|
||||
"PGID": 1001,
|
||||
"localdisks": "/dev/sdb1",
|
||||
"networkdisks": "<//SERVER/SHARE>",
|
||||
"cifsusername": "<username>",
|
||||
"cifspassword": "<password>"
|
||||
},
|
||||
"schema": {
|
||||
"PUID": "int",
|
||||
"PGID": "int",
|
||||
"TZ": "str?",
|
||||
"localdisks": "str",
|
||||
"networkdisks": "str",
|
||||
"cifsusername": "str",
|
||||
"cifspassword": "str"
|
||||
}
|
||||
|
||||
}
|
||||
5
musicbrainz_picard/root/etc/cont-init.d/00-ha-env
Normal file
5
musicbrainz_picard/root/etc/cont-init.d/00-ha-env
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do
|
||||
printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k
|
||||
done
|
||||
46
musicbrainz_picard/root/etc/cont-init.d/50-mounts
Normal file
46
musicbrainz_picard/root/etc/cont-init.d/50-mounts
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
#!/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/storage && \
|
||||
if [ ! -d /share/storage ]; then
|
||||
echo "Creating /share/storage"
|
||||
mkdir -p /share/storage
|
||||
chown -R abc:abc /share/storage
|
||||
fi
|
||||
|
||||
mount $disk /share/storage && \
|
||||
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 /share/storagecifs ]; then
|
||||
echo "Creating /share/storagecifs"
|
||||
mkdir -p /share/storagecifs
|
||||
chown -R abc:abc /share/storagecifs
|
||||
fi
|
||||
|
||||
mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /share/storagecifs && \
|
||||
bashio::log.info "Success!"
|
||||
done || \
|
||||
bashio::log.warning "Protection mode is ON. Unable to mount external drives!"
|
||||
fi
|
||||
Reference in New Issue
Block a user