Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
#!/bin/bash
x=$(systemctl is-active hassio-supervisor | grep -w active)
echo "x=${x}"
while true ; do
 echo "In While Loop"
 if [ "${x}" != "active" ] ; then
  echo "x != active"
  docker ps --filter name=hassio -aq | xargs docker stop | xargs docker rm
  sleep 1
  systemctl start hassio-supervisor
  sleep 1
  /opt/hassio/setup/apparmour_setup.sh
  sleep 1
  systemctl start hassio-supervisor
  x=$(systemctl is-active hassio-supervisor | grep -w active)
 else
  echo "breaking"
  break
 fi
 sleep 1
done

echo "moving on"

  • No labels