diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 2a418df..0000000 --- a/.drone.yml +++ /dev/null @@ -1,128 +0,0 @@ -kind: pipeline -type: docker -name: docmaster - -steps: - - name: build_and_publish_docmaster - image: plugins/docker:linux-amd64 - settings: - dockerfile: docmaster/Dockerfile - context: docmaster - password: - from_secret: docker_password - registry: docker.asperti.com - repo: docker.asperti.com/paspo/hassio-docmaster - tags: - - latest - - 0.1.2 - username: - from_secret: docker_username - -trigger: - event: - - tag - - push - ---- -kind: pipeline -type: docker -name: ot-recorder - -steps: - - name: build_and_publish_ot-recorder - image: plugins/docker:linux-amd64 - settings: - dockerfile: ot-recorder/Dockerfile - context: ot-recorder - password: - from_secret: docker_password - registry: docker.asperti.com - repo: docker.asperti.com/paspo/hassio-ot-recorder - tags: - - latest - - 0.2.2 - username: - from_secret: docker_username - -trigger: - event: - - tag - - push - ---- -kind: pipeline -type: docker -name: upsmon - -steps: - - name: build_and_publish_upsmon - image: plugins/docker:linux-amd64 - settings: - dockerfile: upsmon/Dockerfile - context: upsmon - password: - from_secret: docker_password - registry: docker.asperti.com - repo: docker.asperti.com/paspo/hassio-upsmon - tags: - - latest - - 0.2.0 - username: - from_secret: docker_username - -trigger: - event: - - tag - - push - ---- -kind: pipeline -type: docker -name: zabbix-agent - -steps: - - name: build_and_publish_zabbix-agent - image: plugins/docker:linux-amd64 - settings: - dockerfile: zabbix-agent/Dockerfile - context: zabbix-agent - password: - from_secret: docker_password - registry: docker.asperti.com - repo: docker.asperti.com/paspo/hassio-zabbix-agent - tags: - - latest - - 0.1.4 - username: - from_secret: docker_username - -trigger: - event: - - tag - - push - ---- -kind: pipeline -type: docker -name: zabbix-agent2 - -steps: - - name: build_and_publish_zabbix-agent2 - image: plugins/docker:linux-amd64 - settings: - dockerfile: zabbix-agent2/Dockerfile - context: zabbix-agent2 - password: - from_secret: docker_password - registry: docker.asperti.com - repo: docker.asperti.com/paspo/hassio-zabbix-agent2 - tags: - - latest - - 0.1.2 - username: - from_secret: docker_username - -trigger: - event: - - tag - - push \ No newline at end of file diff --git a/auto-backup/Dockerfile b/auto-backup/Dockerfile deleted file mode 100644 index c27c37d..0000000 --- a/auto-backup/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG BUILD_FROM -FROM $BUILD_FROM - -ENV LANG C.UTF-8 - -# Copy scripts for add-on -COPY run.sh / -COPY backup.sh / - -RUN apk add -U jq bc curl && \ - chmod a+x /run.sh && \ - chmod a+x /backup.sh - -CMD [ "/run.sh" ] diff --git a/auto-backup/README.md b/auto-backup/README.md deleted file mode 100644 index 38e30c0..0000000 --- a/auto-backup/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Auto Backup - -This plugins takes a backup of your hassio instance based on the timing you specify in config. Just use standard cron format (min hour day month weekday). -You can specify how many backups you want to mantain (should be >= 1). Note that backups are deleted after a new one is taken, so if something goes wrong, you end up with no recent backup and the oldest valid ones. diff --git a/auto-backup/backup.sh b/auto-backup/backup.sh deleted file mode 100644 index 5bc9e8a..0000000 --- a/auto-backup/backup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -echo -echo "Taking a new backup" - -CONFIG_PATH=/data/options.json -NUM_BACKUPS=$(jq --raw-output ".num_backups" $CONFIG_PATH) -if [ $NUM_BACKUPS -lt 1 ] ; then - NUM_BACKUPS=1 -fi - -# retrieve current backup list -CURRENT_BACKUPS=$( curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" http://hassio/backups ) -STATUS=$(echo "$CURRENT_BACKUPS" | jq --raw-output '.result') -if [ ! "$STATUS" = "ok" ] ; then - echo "ERROR: Can't retrieve current backup list." - exit 1 -fi - - -# take backup (this can take a long time) -START_TIMESTAMP=$(date "+%s") -RESULT=$( curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" --data '{"name":"Automatic Backup"}' -X POST http://hassio/backups/new/full ) -BACKUP_TIMESTAMP=$(date "+%s") -BACKUP_TIME=$(echo "$BACKUP_TIMESTAMP - $START_TIMESTAMP" | bc) - -# check if backup is ok -STATUS=$(echo "$RESULT" | jq --raw-output '.result') -if [ ! "$STATUS" = "ok" ] ; then - echo "Backup FAILED after $BACKUP_TIME seconds." - exit 1 -fi - -SLUG=$(echo "$RESULT" | jq --raw-output '.data.slug') -echo "Backup $SLUG taken SUCCESSFULLY in $BACKUP_TIME seconds." - -# housekeeping: -# we take the list of backups (which was taken before this backup) -# we sort by date (reversed), remove the protected backups and take -# only a list of slugs -# then we skip the first NUM_BACKUPS slugs and delete all the rest -FIRST_SLUG_TO_DELETE=$(echo "1 + $NUM_BACKUPS" | bc) -echo $CURRENT_BACKUPS | jq --raw-output ".data.backups | sort_by(.date) | reverse[] | select(.slug != \"$SLUG\") | select (.protected==false) | .slug " | tail -n +$FIRST_SLUG_TO_DELETE | while read SLUG_TO_DELETE - do - echo "Removing backup $SLUG_TO_DELETE" - curl -s -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X POST http://hassio/backups/$SLUG_TO_DELETE/remove - done diff --git a/auto-backup/config.json b/auto-backup/config.json deleted file mode 100644 index 3c1315f..0000000 --- a/auto-backup/config.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "Auto Backup", - "url": "https://git.asperti.com/paspo/hassio-addons", - "version": "0.2.0", - "slug": "auto-backup", - "description": "Take hassio backups with fixed timings and manage retention", - "startup": "application", - "boot": "auto", - "arch": [ - "aarch64", - "amd64", - "armhf", - "i386" - ], - "homeassistant": "2021.9", - "hassio_api": true, - "hassio_role": "backup", - "options": { - "cron": "15 3 * * *", - "num_backups": 10 - }, - "schema": { - "cron": "str", - "num_backups": "int" - } -} diff --git a/auto-backup/icon.png b/auto-backup/icon.png deleted file mode 100644 index 6f87fa2..0000000 Binary files a/auto-backup/icon.png and /dev/null differ diff --git a/auto-backup/logo.png b/auto-backup/logo.png deleted file mode 100644 index 6f87fa2..0000000 Binary files a/auto-backup/logo.png and /dev/null differ diff --git a/auto-backup/run.sh b/auto-backup/run.sh deleted file mode 100644 index 9bc287c..0000000 --- a/auto-backup/run.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e - -CONFIG_PATH=/data/options.json - -CRON=$(jq --raw-output ".cron" $CONFIG_PATH) - -echo "$CRON /backup.sh >> /var/log/cron.log" > /var/spool/cron/crontabs/root - -# change perms -chmod 600 /var/spool/cron/crontabs/root - -echo "Auto backup ready." -crond -touch /var/log/cron.log -tail -f /var/log/cron.log \ No newline at end of file diff --git a/docmaster/Dockerfile b/docmaster/Dockerfile deleted file mode 100644 index 2794778..0000000 --- a/docmaster/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ - -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:9.2.2 -FROM ${BUILD_FROM} - -# --no-cache -RUN \ - apk -U upgrade && \ - apk add ghostscript py3-flask py3-gunicorn && \ - apk add py3-unoconv --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ && \ - apk add font-noto-all ttf-ubuntu-font-family ttf-freefont ttf-font-awesome ttf-opensans && \ - apk add samba-client jq - -COPY start.sh /app/ -COPY app.py /app/ - -EXPOSE 6000 -HEALTHCHECK CMD curl --fail http://localhost:6000/ || exit 1 - -ENTRYPOINT ["/app/start.sh"] diff --git a/docmaster/app.py b/docmaster/app.py deleted file mode 100755 index 3b24d28..0000000 --- a/docmaster/app.py +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env python3 - -from flask import Flask, jsonify, request, send_from_directory -import tempfile -import subprocess -import os -import sys - -app = Flask(__name__) - -@app.route('/') -def helloWorld(): - return "Hi! Please check usage docs.\n" - - -@app.route('/status') -def getStatus(): - PRINTER_HOST = os.environ.get("PRINTER_HOST") - return jsonify({"status": "OK", "printer_host": PRINTER_HOST}) - - -def getFile(tmpDir): - if request.files.get('file', None): - f = request.files['file'] - infile = tmpDir.name + '/' + f.name - f.save(infile) - elif request.form.get('smbfile'): - smbhost = request.form.get('smbhost', None) - smbuser = request.form.get('smbuser', None) - smbpass = request.form.get('smbpass', None) - smbworkgroup = request.form.get('smbworkgroup', None) - smbshare = request.form.get('smbshare', None) - smbdir = request.form.get('smbdir', None) - smbfile = request.form.get('smbfile', None) - v = [ smbhost, smbuser, smbpass, smbworkgroup, smbshare, smbdir, smbfile ] - if (all(v)): - os.chdir(tmpDir.name) - r = subprocess.run(['smbclient', - '--user', smbuser, - '--workgroup', smbworkgroup, - '--directory', smbdir, - '--command', 'get "%s"' % (smbfile), - '//%s/%s' % (smbhost, smbshare), - smbpass ] ) - if r.returncode != 0: - return None - infile = tmpDir.name + '/' + smbfile - else: - return None - return infile - - -@app.route('/convert/pdf', methods=["POST"]) -def toPDF(): - tmpDir = tempfile.TemporaryDirectory() - infile = getFile(tmpDir) - pdffile = infile + '.pdf' - - r = subprocess.run(['/usr/bin/unoconv', '--output', pdffile, infile]) - if r.returncode != 0: - return jsonify({"status": "conversion error"}) - - return send_from_directory(directory=tmpDir.name, - filename=os.path.basename(pdffile), - mimetype='application/pdf', - as_attachment=True) - - -@app.route('/print', methods=["POST"]) -def print(): - PRINTER_HOST = os.environ.get("PRINTER_HOST") - if not PRINTER_HOST: - raise ValueError("You have to set the PRINTER_HOST environment variable") - - tmpDir = tempfile.TemporaryDirectory() - infile = getFile(tmpDir) - - unoconv = subprocess.Popen(['/usr/bin/unoconv','--stdout',infile], stdout=subprocess.PIPE) - pdf2ps = subprocess.Popen(['/usr/bin/pdf2ps','-','-'], stdin=unoconv.stdout, stdout=subprocess.PIPE) - unoconv.wait() - unoconv.stdout.close() - printer = subprocess.Popen(['/usr/bin/nc','-w','1', PRINTER_HOST,'9100'], stdin=pdf2ps.stdout) - pdf2ps.wait() - pdf2ps.stdout.close() - printer.wait() - - return jsonify({"status": "ok"}) - - -if __name__ == '__main__': - app.run(port=6000) diff --git a/docmaster/config.json b/docmaster/config.json deleted file mode 100644 index c2ecd46..0000000 --- a/docmaster/config.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "DocMaster", - "url": "https://git.asperti.com/paspo/hassio-addons", - "image": "docker.asperti.com/paspo/hassio-docmaster", - "version": "0.1.2", - "slug": "docmaster", - "description": "document conversion and print", - "startup": "services", - "boot": "auto", - "audio": false, - "gpio": false, - "arch": [ - "amd64" - ], - "ports": { - "6000/tcp": 6000 - }, - "options": { - "printer_host": "192.168.1.30" - }, - "schema": { - "printer_host": "str" - } -} diff --git a/docmaster/icon.png b/docmaster/icon.png deleted file mode 100644 index c17dc60..0000000 Binary files a/docmaster/icon.png and /dev/null differ diff --git a/docmaster/logo.png b/docmaster/logo.png deleted file mode 100644 index c17dc60..0000000 Binary files a/docmaster/logo.png and /dev/null differ diff --git a/docmaster/start.sh b/docmaster/start.sh deleted file mode 100755 index 8921fcc..0000000 --- a/docmaster/start.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -set -e - -CONFIG_PATH=/data/options.json -PRINTER_HOST=$(jq --raw-output ".printer_host" $CONFIG_PATH) - -echo "PRINTER_HOST: $PRINTER_HOST" - -cd /app -export PRINTER_HOST -gunicorn app:app --bind 0.0.0.0:6000 --workers=2 diff --git a/ot-recorder/Dockerfile b/ot-recorder/Dockerfile deleted file mode 100644 index 465ea4c..0000000 --- a/ot-recorder/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.2 -FROM $BUILD_FROM AS builder - -ENV LANG C.UTF-8 - -RUN apk add --no-cache \ - abuild linux-headers musl-dev mosquitto-dev \ - lmdb-dev curl-dev libconfig-dev gcc make libsodium-dev && \ - wget -q https://github.com/owntracks/recorder/archive/0.8.7.tar.gz -O - | tar xvzC /tmp - -COPY config.mk /tmp/recorder-0.8.7/ - -RUN cd /tmp/recorder-0.8.7/ && \ - make - - -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.2 -FROM $BUILD_FROM - -ENV LANG C.UTF-8 - -RUN apk -U --no-cache upgrade && \ - apk --no-cache add jq && \ - apk --no-cache add libcurl lmdb libconfig libsodium mosquitto-libs - -EXPOSE 8083 - -COPY --from=builder /tmp/recorder-0.8.7/ocat /usr/sbin/ -COPY --from=builder /tmp/recorder-0.8.7/ot-recorder /usr/sbin/ -COPY --from=builder /tmp/recorder-0.8.7/docroot /var/spool/owntracks/recorder/htdocs -COPY run.sh / -RUN chmod a+x /run.sh - -CMD [ "/run.sh" ] diff --git a/ot-recorder/README.md b/ot-recorder/README.md deleted file mode 100644 index b095e17..0000000 --- a/ot-recorder/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Owntracks Recorder - -[Owntracks Recorder](https://github.com/owntracks/recorder) packaged for hass.io. diff --git a/ot-recorder/config.json b/ot-recorder/config.json deleted file mode 100644 index f4057b2..0000000 --- a/ot-recorder/config.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "Owntracks Recorder", - "url": "https://git.asperti.com/paspo/hassio-addons", - "image": "docker.asperti.com/paspo/hassio-ot-recorder", - "version": "0.2.2", - "slug": "ot-recorder", - "description": "Owntracks Recorder - connects to your mqtt broker and consumes owntracks locations", - "startup": "services", - "boot": "auto", - "ports": { - "8083": 8083 - }, - "arch": [ - "aarch64", - "amd64", - "armhf", - "i386" - ], - "webui": "http://[HOST]:[PORT:8083]/", - "map": ["share:rw"], - "options": { - "topics": "owntracks/#", - "host": "IPADDRESS_OR_HOSTNAME", - "port": 1883, - "user": "DVES_USER", - "pass": "DVES_PASS", - "qos": 2 - }, - "schema": { - "topics": "str", - "host": "str", - "port": "port", - "user": "str", - "pass": "str", - "qos": "int" - } -} - diff --git a/ot-recorder/config.mk b/ot-recorder/config.mk deleted file mode 100644 index c8584a5..0000000 --- a/ot-recorder/config.mk +++ /dev/null @@ -1,23 +0,0 @@ -FREEBSD ?= no -INSTALLDIR = /usr -WITH_MQTT ?= yes -WITH_HTTP ?= yes -WITH_LUA ?= no -WITH_PING ?= yes -WITH_KILL ?= no -WITH_ENCRYPT ?= yes -WITH_GREENWICH ?= no -STORAGEDEFAULT = /share/ot-recorder/ -DOCROOT = /var/spool/owntracks/recorder/htdocs -GHASHPREC = 7 -JSON_INDENT ?= no -CONFIGFILE = /etc/ot-recorder.cfg -MOSQUITTO_INC = -I/usr/include -MOSQUITTO_LIB = -L/usr/lib -MORELIBS += # -lssl -LUA_CFLAGS = `pkg-config --cflags lua` -LUA_LIBS = `pkg-config --libs lua` -SODIUM_CFLAGS = `pkg-config --cflags libsodium` -SODIUM_LIBS = `pkg-config --libs libsodium` -GEOCODE_TIMEOUT = 4000 - diff --git a/ot-recorder/icon.png b/ot-recorder/icon.png deleted file mode 100644 index 37df095..0000000 Binary files a/ot-recorder/icon.png and /dev/null differ diff --git a/ot-recorder/logo.png b/ot-recorder/logo.png deleted file mode 100644 index 37df095..0000000 Binary files a/ot-recorder/logo.png and /dev/null differ diff --git a/ot-recorder/run.sh b/ot-recorder/run.sh deleted file mode 100644 index 7f4edc2..0000000 --- a/ot-recorder/run.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -CONFIG_PATH=/data/options.json - -TOPICS=$(jq --raw-output ".topics" $CONFIG_PATH) -HOST=$(jq --raw-output ".host" $CONFIG_PATH) -PORT=$(jq --raw-output ".port" $CONFIG_PATH) -USER=$(jq --raw-output ".user" $CONFIG_PATH) -PASS=$(jq --raw-output ".pass" $CONFIG_PATH) -QOS=$(jq --raw-output ".qos" $CONFIG_PATH) - -echo " -OTR_STORAGEDIR = \"/share/ot-recorder\" -OTR_TOPICS = \"$TOPICS\" -OTR_HOST = \"$HOST\" -OTR_PORT = $PORT -OTR_USER = \"$USER\" -OTR_PASS = \"$PASS\" -OTR_QOS = $QOS -" > /etc/ot-recorder.cfg - -if [ ! -d /share/ot-recorder ] ; then - mkdir /share/ot-recorder -fi - -if [ ! -f /share/ot-recorder/ghash/data.mdb ] ; then - /usr/sbin/ot-recorder --initialize -fi - -/usr/sbin/ot-recorder --http-host 0.0.0.0 diff --git a/upsmon/Dockerfile b/upsmon/Dockerfile deleted file mode 100644 index 0954a94..0000000 --- a/upsmon/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.0.2 -FROM $BUILD_FROM - -ENV LANG C.UTF-8 - -COPY run.sh shutdown.sh / - -RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ - echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ - echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \ - apk add -U jq nut curl util-linux && \ - mkdir /var/run/nut && \ - chown root:nut /var/run/nut && \ - chmod 770 /var/run/nut && \ - chmod a+x /run.sh /shutdown.sh - -CMD [ "/run.sh" ] diff --git a/upsmon/README.md b/upsmon/README.md deleted file mode 100644 index e5497a2..0000000 --- a/upsmon/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Network UPS Tools - netclient - -[Network UPS Tools](http://networkupstools.org/) is used to connect to another machine running the same software. -You just need to specify some connection parameters. You can also configure the shutdown delay (in minutes). diff --git a/upsmon/config.json b/upsmon/config.json deleted file mode 100644 index f990247..0000000 --- a/upsmon/config.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Network UPS Tools - netclient", - "url": "https://git.asperti.com/paspo/hassio-addons", - "image": "docker.asperti.com/paspo/hassio-upsmon", - "version": "0.2.0", - "slug": "upsmon", - "description": "Connect to a remote NUT server", - "startup": "services", - "boot": "auto", - "arch": [ - "aarch64", - "amd64", - "armhf", - "i386" - ], - "hassio_api": true, - "hassio_role": "admin", - "options": { - "credentials": { - "user": "monuser", - "pass": "secret" - }, - "ups": { - "upsname": "ups", - "host": "IPADDR" - }, - "delay": 5 - }, - "schema": { - "credentials": { - "user": "str", - "pass": "str" - }, - "ups": { - "upsname": "str", - "host": "str" - }, - "delay": "int" - } -} diff --git a/upsmon/icon.png b/upsmon/icon.png deleted file mode 100644 index 4c36deb..0000000 Binary files a/upsmon/icon.png and /dev/null differ diff --git a/upsmon/logo.png b/upsmon/logo.png deleted file mode 100644 index 4c36deb..0000000 Binary files a/upsmon/logo.png and /dev/null differ diff --git a/upsmon/repositories b/upsmon/repositories deleted file mode 100644 index 4bfbbae..0000000 --- a/upsmon/repositories +++ /dev/null @@ -1,3 +0,0 @@ -http://dl-cdn.alpinelinux.org/alpine/edge/main -http://dl-cdn.alpinelinux.org/alpine/edge/community -http://dl-cdn.alpinelinux.org/alpine/edge/testing diff --git a/upsmon/run.sh b/upsmon/run.sh deleted file mode 100644 index 353e36d..0000000 --- a/upsmon/run.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e - -CONFIG_PATH=/data/options.json - -UPSNAME=$(jq --raw-output ".ups.upsname" $CONFIG_PATH) -HOST=$(jq --raw-output ".ups.host" $CONFIG_PATH) -USER=$(jq --raw-output ".credentials.user" $CONFIG_PATH) -PASS=$(jq --raw-output ".credentials.pass" $CONFIG_PATH) -DELAY=$(jq --raw-output ".delay" $CONFIG_PATH) - -echo " -MONITOR ${UPSNAME}@${HOST} 1 ${USER} ${PASS} slave -MINSUPPLIES 1 -SHUTDOWNCMD \"/shutdown.sh\" -POLLFREQ 5 -POLLFREQALERT 5 -HOSTSYNC 15 -DEADTIME 15 -POWERDOWNFLAG /etc/killpower -RBWARNTIME 43200 -NOCOMMWARNTIME 300 -" > /etc/nut/upsmon.conf - -echo "MODE=netclient" > /etc/nut/nut.conf - -# change perms on config files -chmod 660 /etc/nut/* - -upsmon -D diff --git a/upsmon/shutdown.sh b/upsmon/shutdown.sh deleted file mode 100644 index 063f9d2..0000000 --- a/upsmon/shutdown.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -curl -H "X-HASSIO-KEY: $HASSIO_TOKEN" -X POST http://hassio/host/shutdown diff --git a/zabbix-agent/Dockerfile b/zabbix-agent/Dockerfile deleted file mode 100644 index f54220c..0000000 --- a/zabbix-agent/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG BUILD_FROM=hassioaddons/base:8.0.6 -FROM $BUILD_FROM - -ENV LANG C.UTF-8 - -# Copy scripts for add-on -COPY run.sh / - -RUN apk add -U jq zabbix-agent sudo && \ - chmod a+x /run.sh - -CMD [ "/run.sh" ] diff --git a/zabbix-agent/config.json b/zabbix-agent/config.json deleted file mode 100644 index 5b77de6..0000000 --- a/zabbix-agent/config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "Zabbix Agent", - "url": "https://git.asperti.com/paspo/hassio-addons", - "image": "docker.asperti.com/paspo/hassio-zabbix-agent", - "version": "0.1.4", - "slug": "zabbix-agent", - "description": "Zabbix Agent for hass.io", - "startup": "services", - "boot": "auto", - "audio": false, - "gpio": false, - "arch": [ - "aarch64", - "amd64", - "armhf", - "i386" - ], - "ports": { - "10050/tcp": 10050 - }, - "map": [ - "share" - ], - "options": { - "server": "zabbix-server", - "hostname": "hassio" - }, - "schema": { - "server": "str", - "hostname": "str" - } -} diff --git a/zabbix-agent/icon.png b/zabbix-agent/icon.png deleted file mode 100644 index 0d14501..0000000 Binary files a/zabbix-agent/icon.png and /dev/null differ diff --git a/zabbix-agent/logo.png b/zabbix-agent/logo.png deleted file mode 100644 index 2f2bc49..0000000 Binary files a/zabbix-agent/logo.png and /dev/null differ diff --git a/zabbix-agent/run.sh b/zabbix-agent/run.sh deleted file mode 100644 index fc67ef0..0000000 --- a/zabbix-agent/run.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -e - -CONFIG_PATH=/data/options.json -CUSTOM_CFG_PATH=/share/zabbix-agent - -SERVER=$(jq --raw-output ".server" $CONFIG_PATH) -HOSTNAME=$(jq --raw-output ".hostname" $CONFIG_PATH) - -if [ ! -d "$CUSTOM_CFG_PATH" ] ; then - mkdir -p "$CUSTOM_CFG_PATH" -fi - -echo " -Server=$SERVER -ServerActive=$SERVER -Hostname=$HOSTNAME -LogType=console -Include=${CUSTOM_CFG_PATH}/*.conf -" > /etc/zabbix/zabbix_agentd.conf - -sudo -u zabbix zabbix_agentd -f diff --git a/zabbix-agent2/Dockerfile b/zabbix-agent2/Dockerfile deleted file mode 100644 index 859c079..0000000 --- a/zabbix-agent2/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG BUILD_FROM=hassioaddons/base:8.0.6 -FROM $BUILD_FROM - -ENV LANG C.UTF-8 - -# Copy scripts for add-on -COPY run.sh / - -RUN apk add -U jq zabbix-agent2=5.0.14-r1 sudo && \ - chmod a+x /run.sh - -CMD [ "/run.sh" ] diff --git a/zabbix-agent2/config.json b/zabbix-agent2/config.json deleted file mode 100644 index 0bf1ba7..0000000 --- a/zabbix-agent2/config.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "Zabbix Agent 2", - "url": "https://git.asperti.com/paspo/hassio-addons", - "image": "docker.asperti.com/paspo/hassio-zabbix-agent2", - "version": "0.1.2", - "slug": "zabbix-agent2", - "description": "Zabbix Agent 2 for hass.io", - "startup": "services", - "boot": "auto", - "audio": false, - "gpio": false, - "arch": [ - "aarch64", - "amd64", - "armhf", - "i386" - ], - "ports": { - "10050/tcp": 10050 - }, - "map": [ - "share" - ], - "options": { - "server": "zabbix-server", - "hostname": "hassio" - }, - "schema": { - "server": "str", - "hostname": "str" - } -} diff --git a/zabbix-agent2/icon.png b/zabbix-agent2/icon.png deleted file mode 100644 index 0d14501..0000000 Binary files a/zabbix-agent2/icon.png and /dev/null differ diff --git a/zabbix-agent2/logo.png b/zabbix-agent2/logo.png deleted file mode 100644 index 2f2bc49..0000000 Binary files a/zabbix-agent2/logo.png and /dev/null differ diff --git a/zabbix-agent2/run.sh b/zabbix-agent2/run.sh deleted file mode 100644 index b9a7b14..0000000 --- a/zabbix-agent2/run.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -set -e - -CONFIG_PATH=/data/options.json -CUSTOM_CFG_PATH=/share/zabbix-agent2 - -SERVER=$(jq --raw-output ".server" $CONFIG_PATH) -HOSTNAME=$(jq --raw-output ".hostname" $CONFIG_PATH) - -if [ ! -d "$CUSTOM_CFG_PATH" ] ; then - mkdir -p "$CUSTOM_CFG_PATH" -fi - -echo " -Server=$SERVER -ServerActive=$SERVER -Hostname=$HOSTNAME -LogType=console -Include=${CUSTOM_CFG_PATH}/*.conf -" > /etc/zabbix/zabbix_agent2.conf - -sudo -u zabbix zabbix_agent2 -f