Domoticz Docker image op Synology DS220+

Posted by ronald on juni 22, 2021 in Synology with Comments closed |
  • Installeer Docker via Packagecenter van de DS220+
  • Maak een directory aan om de configuratie op te bewaren van Domoticz
    mkdir -p /volume1/domoticz/config
  • Maak het bestand /volume1/domoticz/docker-compose.yml aan en vul deze met:
    ---
    version: "2.1"
    services:
    domoticz:
    image: ghcr.io/linuxserver/domoticz
    container_name: domoticz
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Amsterdam
    volumes:
      - /volume1/domoticz/config:/config
    ports:
      - 9080:8080
      - 6144:6144
      - 9443:1443
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0
    restart: unless-stopped
  • Start domoticz met:
    sudo su -
    cd /volume1/domoticz
    docker-compose up -d
  • Stop domoticz met:
    sudo su -
    cd /volume1/domoticz
    docker-compose stop
  • De devices /dev/ttyUSB0 is optioneel. In mijn geval heb ik een RFXcom433trx aan de DS220+ hangen
  • Je kan hem nu monitoren vanuit de Docker applicatie op de DS220+, maar stoppen en starten via bovenstaande manier.

 

Tags: , ,

Koppelen YubiKey 5 NFC als smartcard op MacOS

Posted by ronald on juni 18, 2021 in Nieuws with Comments closed |

Volg daarvoor normaal gesproken de instructies op deze webpagina:
https://support.yubico.com/hc/en-us/articles/360016649059-Using-Your-YubiKey-as-a-Smart-Card-in-macOS

Echter als je dit al een keer gedaan heb en je huidige settings op de Yubikey niet wil kwijtraken, of je gebruikt hem voor de tweede MacBook ofzo volg dan deze instructies.

  1. Download en Installeer  Yubikey Manager van Yubico. Die heb je nodig voor de commando’s hieronder.
  2. sc_auth identities
    bewaar de hash
  3. sudo sc_auth pair -u <macos usernaam> -h <gevondenhash>
  4. sc_auth list

ansible examples

Posted by ronald on februari 3, 2021 in Ansible, RHEL with Comments closed |
Ansible fun 1
---

- hosts: all
  become: yes
  vars:
    selinux_policy: targeted
    selinux_state: enforcing
    haproxy_backend_balance_method: 'roundrobin'
    haproxy_backend_servers:
      - name: node1
        address: 192.168.4.201:80
      - name: node2
        address: 192.168.4.202:80
      - name: node3
        address: 192.168.4.203:80
    firewall:
      - {​​​​​​​ service: 'ssh', state: 'enabled' }​​​​​
      - {​​​​​​​ service: 'http', state: 'enabled' }​​​​
      - {​​​​​​​ service: 'cockpit', state: 'enabled' }​​​
​​​​      - {​​​​​​​ service: 'dhcpv6-client', state: 'enabled' }​​​​
 ​​​   roles:
      - linux-system-roles.selinux
      - linux-system-roles.firewall
      - {​​​​​​​ role: geerlingguy.haproxy, when: '"controlhost" in group_names' }​​​​​
      - {​​​​​​​ role: geerlingguy.apache, when: '"nodes" in group_names' }​​​​​​​

Install Domoticz on the Raspberry PI 3

Posted by ronald on februari 1, 2018 in Nieuws with Comments closed |

Raspberry PI 3B

32GB Class 10 MicroSD

2017-11-29-raspbian-stretch-lite.img

 

 

Installatie van Domoticz package:

sudo curl L install.domoticz.com | bash

 

Remove LUN from RHEL 6.5

Posted by ronald on april 29, 2015 in RHEL with Comments closed |

Logon as root

 

First remove LUN from Volume group:

vgreduce /dev/mapper/mpathX

 

Then remove pv signature:

pvremove /dev/mapper/mpathX

 

First remove scsi devices from the multipath device of mpathX.

The following script will display what to remove:

#!/bin/bash
LUN=$1

if [ -L /dev/mapper/$LUN ]
then
multipath -l $LUN | grep -v policy | grep -v size  | grep -v “$LUN” | sed “s/.*sd/sd/g” | awk ‘{ print $1 }’ | while read devnode
do
nodeloc=$(lsscsi | grep -w “${devnode}” | awk ‘{ print $1 }’ | tr -d ‘[‘ | tr -d ‘]’)
echo echo 1 \> \”/sys/class/scsi_device/$nodeloc/device/delete\”
done
fi

Example output:

echo 1 > “/sys/class/scsi_device/0:0:1:6/device/delete”
echo 1 > “/sys/class/scsi_device/1:0:1:6/device/delete”
echo 1 > “/sys/class/scsi_device/0:0:0:6/device/delete”
echo 1 > “/sys/class/scsi_device/1:0:0:6/device/delete”

 

Run this output.

After this run:

multipath -F

multipath -r

 

 

 

 

 

Show all LUN’s on RHEL 6.5

Posted by ronald on april 29, 2015 in RHEL with Comments closed |

Logon as root

 

Create a script called showluns

#!/bin/bash
echo “pvscan…”
pvscan > /tmp/pvscan.out
echo “collecting mpaths”
mpathlist=$(multipath -ll -v 1 | sort)
echo “”
for mpath in $mpathlist
do
multipath -l $mpath > /tmp/multipath.$mpath.out
size=$(cat /tmp/multipath.$mpath.out | grep “size=” | awk ‘{print $1 }’ | sed “s/size=//g”)
lunid=$(cat /tmp/multipath.$mpath.out | head -n 1 | awk ‘{print $2 }’ | tr -d ‘)’ | tr -d ‘(‘ )
vgname=$(grep -w /dev/mapper/$mpath /tmp/pvscan.out | grep -w VG | awk ‘{ print $4 }’)
ispv=$(grep -w /dev/mapper/$mpath /tmp/pvscan.out | grep -w PV | awk ‘{ print $4 }’)

if [ -z “$vgname” ]

then

if [ -z “$ispv” ]

then

vgname=”FREE”

else

vgname=”FREE PV”

fi

fi

echo “$mpath $lunid $size $vgname ”
rm -f  /tmp/multipath.$mpath.out
done

RHEL6.5 Scan for new SAN LUN’s

Posted by ronald on april 29, 2015 in RHEL with Comments closed |

Logon as root

 

Depending on how many ports/adapters issue: (in my case 2 ports)

echo 1 > /sys/class/fc_host/host0/issue_lip
echo 1 > /sys/class/fc_host/host1/issue_lip

 

Remap found devices with multipath.

multipath -r

 

 

RHEL65: Rename the operating system volume group

Posted by ronald on februari 17, 2015 in Nieuws with Comments closed |

 

Login as root

 

# vgrename  oldvgname newvgname

 

# vi /etc/fstab

replace vgnames

 

# vi /etc/grub.conf

replace vgnames

 

# this will cause an extra reboot because of rebuilding SElinux database

# touch /.autorelabel

# reboot

 

SELinux errors “Unable to get valid context for” after cloning system

Posted by ronald on februari 17, 2015 in Nieuws with Comments closed |

The simplest way to solve this:

 

# touch /.autorelabel

# reboot

 

If you’re system is crashing first boot from DVD or recovery media. Mount the root filesystem and:

# touch /mnt/.autorelabel

# reboot

 

mkvmerge voorbeelden

Posted by ronald on februari 6, 2015 in Nieuws with Comments closed |

 

# verwijderen subtitles

mkvmerge –nosubs -o outputfile-nosubs.mkv inputfile.mkv

 

# Toevoegen van nederlandse ondertiteling aan bestaande mkv file

mkvmerge -o ouputfile-nlsub.mkv inputfile.mkv –language 0:dut inputfile.srt

 

# mkv file maken met mp4 en srt file

mkvmerge -o outputfile.mkv inputfile.mp3 –language 0:dut inputfile.srt

 

Copyright © 2012-2021 Dutch Ronaldo All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.