Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 26ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
m

mqtt

Recently created Least recently created Recently updated Least recently updated
santiago

santiago / mqtt_shutdown_listen.sh

Last active 2 hours ago bash homeassistant mqtt raspistuff

Simple script listens to a MQTT value change and shutdown the machine

0 0 1
1 #!/usr/bin/env zsh
2
3
4 if [ -z "$RASPISTUFF_DIR" ];then
5 export RASPISTUFF_DIR="$(cd "$(dirname "$(readlink -f "${(%):-%x}")")" && pwd)"
6 fi
7
8
9 cd $RASPISTUFF_DIR