diff --git a/CT-Build/Debian.Jenkinsfile b/CT-Build/Debian.Jenkinsfile index 5fa6c9b..eb00b9b 100644 --- a/CT-Build/Debian.Jenkinsfile +++ b/CT-Build/Debian.Jenkinsfile @@ -1,4 +1,4 @@ -String[] ImgVariantList = ['minimal', 'default', 'jenkinsbuilder', 'imgbuilder', 'jenkins', 'mysql' , 'pihole' , 'collabora' , 'jellyfin' ] +String[] ImgVariantList = ['minimal', 'default', 'jenkinsbuilder', 'imgbuilder', 'jenkins', 'mysql' , 'pihole' , 'collabora' , 'jellyfin', 'domoticz' ] pipeline { agent { label 'LXCBuilder' } diff --git a/CT-Build/Debian.yaml b/CT-Build/Debian.yaml index f8a886c..e6f5364 100644 --- a/CT-Build/Debian.yaml +++ b/CT-Build/Debian.yaml @@ -901,6 +901,13 @@ files: variants: - pihole +#FileForDomoticz +- path: /opt/Setup + generator: copy + source: CT-Files/domoticz + variants: + - domoticz + packages: manager: apt update: true @@ -1052,6 +1059,20 @@ packages: variants: - jellyfin +#domoticz pkgs + - packages: + - git + - curl + - python3-dev + - cron + - libudev-dev + - libsqlite3-0 + - libcurl4 + - libusb-0.1 + action: install + variants: + - domoticz + repositories: - name: sources.list url: |- @@ -1125,7 +1146,8 @@ actions: rm /opt/Setup/Scripts/Init.sh variants: - mysql - - pihole + - pihole + - domoticz - trigger: post-packages action: |- diff --git a/CT-Files/domoticz/Configs/domoticz.service b/CT-Files/domoticz/Configs/domoticz.service new file mode 100644 index 0000000..f286326 --- /dev/null +++ b/CT-Files/domoticz/Configs/domoticz.service @@ -0,0 +1,13 @@ +[Unit] +Description=Domoticz Home Automation +After=network.target + +[Service] +ExecStart=/opt/domoticz/domoticz -www 8080 -sslwww 0 -syslog +Username=domoticz +Group=domoticz +KillMode=process +Restart=on-failure + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/CT-Files/domoticz/Configs/setupVars.conf b/CT-Files/domoticz/Configs/setupVars.conf new file mode 100644 index 0000000..0f4a613 --- /dev/null +++ b/CT-Files/domoticz/Configs/setupVars.conf @@ -0,0 +1,5 @@ +Dest_folder=/opt/domoticz +Enable_http=true +HTTP_port=8080 +Enable_https=false +HTTPS_port=443 \ No newline at end of file diff --git a/CT-Files/domoticz/Scripts/Init.sh b/CT-Files/domoticz/Scripts/Init.sh new file mode 100644 index 0000000..19da5f3 --- /dev/null +++ b/CT-Files/domoticz/Scripts/Init.sh @@ -0,0 +1,24 @@ +#!/bin/bash +#Adding service user +adduser --system --shell /bin/bash --group --disabled-password --home /home/domoticz domoticz +#Crating folders +mkdir /opt/domoticz /etc/domoticz + +#Extracting aplication +tar -C /opt/domoticz -xf /opt/Setup/domoticz.tgz +rm -rf /opt/Setup/domoticz.tgz + +#Installing custom theme +git clone https://git.bprieshof.nl/DarkTheme/dark-th3me-BrammpCustom.git /opt/domoticz/www/styles/dark-th3me-BrammpCustom + +#Moving config in place +mv /opt/Setup/Configs/setupVars.conf /etc/domoticz/setupVars.conf + +#Install service file and enable on boot +mv /opt/Setup/Configs/domoticz.service /etc/systemd/system/domoticz.service +chmod +x /etc/systemd/system/domoticz.service +ln -s /etc/systemd/system/domoticz.service /etc/systemd/system/multi-user.target.wants/domoticz.service + +#Set permissions +chown -R domoticz:domoticz /opt/domoticz +chown -R domoticz:domoticz /etc/domoticz \ No newline at end of file diff --git a/CT-Files/domoticz/domoticz.tgz b/CT-Files/domoticz/domoticz.tgz new file mode 100644 index 0000000..5325193 Binary files /dev/null and b/CT-Files/domoticz/domoticz.tgz differ diff --git a/Readme.md b/Readme.md index 560df3b..d0733ab 100644 --- a/Readme.md +++ b/Readme.md @@ -25,12 +25,14 @@ This can be done on a Minimal debian CT (make sure to enable nesting) on the new | pihole | Debian | Pihole CT | | colabora | Debian | ColaboraOffice WebService (CODE version) | | jellyfin | Debian | Jellyfin in-home streaming server | +| domoticz | Debian | Domoticz home automation service | | gitea | Alpine | Gitea server | | nginx | Alpine | Nginx server for reverse-proxy use | | ddns | Alpine | DDNS client configured for OVH/OVH-Cloud | ## TODO -Domoticz +**Begin original list** + Hass+Mqtt Z2mqtt+zw2mqtt SMB @@ -51,7 +53,7 @@ Docker MailBackup* FileShelter/transfer.sh WS(x2go-xfce) - +**End original list** # Container Setup @@ -87,4 +89,6 @@ Then select the created credential and click save # colabora * Update the configuration in /etc/loolwsd/loolwsd.xml and reload the service `systemctl restart loolwsd` # jellyfin -* To set-up the system follow the inital set-up wizard on http://:8096 \ No newline at end of file +* To set-up the system follow the inital set-up wizard on http://:8096 +# domoticz +* Avalible on http://:8080 \ No newline at end of file diff --git a/Scripts/GetExternalResources.sh b/Scripts/GetExternalResources.sh index d276591..329bc57 100644 --- a/Scripts/GetExternalResources.sh +++ b/Scripts/GetExternalResources.sh @@ -13,4 +13,5 @@ GetResource () { #PhpMyadmin for mysql variant GetResource mysql phpmyadmin.tar.gz https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-english.tar.gz GetResource nginx nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub -GetResource nginx acmesh.tar.gz https://codeload.github.com/acmesh-official/acme.sh/tar.gz/master \ No newline at end of file +GetResource nginx acmesh.tar.gz https://codeload.github.com/acmesh-official/acme.sh/tar.gz/master +GetResource domoticz domoticz.tgz https://releases.domoticz.com/releases/release/domoticz_linux_x86_64.tgz \ No newline at end of file