This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local: | |
hostname -I optional with | awk '{print $1}' | |
ip addr show (ip a) | |
ifconfig -a | |
ip route get 1.2.3.4 | awk '{print $7}' | |
nmcli -p device show | |
remote: | |
curl or wget -qO- <host> | |
hosts: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
check the timestamp files for the various apt components: | |
--------------------------------------------------------- | |
ls -l /var/lib/apt/periodic/ | |
check the unattended-upgrades logfile: | |
-------------------------------------- | |
tail -f /var/log/unattended-upgrades/unattended-upgrades.log | |
source: https://askubuntu.com/questions/934807/unattended-upgrades-status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor.yaml: | |
------------ | |
- platform: command_line | |
name: "Apt Sensor" | |
command: "ssh -o StrictHostKeyChecking=no <user>@<host> -p 22 -i /config/sshkey/id_rsa /path/to/get_apt.sh" | |
scan_interval: 43200 #check every 12h | |
command_timeout: 60 | |
get_apt.sh: | |
----------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg-reconfigure tzdata | |
sudo dpkg-reconfigure console-data | |
sudo dpkg-reconfigure locales -plow | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>sudo su | |
>echo 'datasource_list: [ None ]' | sudo -s tee /etc/cloud/cloud.cfg.d/90_dpkg.cfg | |
>apt-get purge cloud-init | |
>rm -rf /etc/cloud/; sudo rm -rf /var/lib/cloud/ | |
>reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on systemd system: | |
hostnamectl set-hostname <new hostname> | |
logout/reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>nano ~/.bashrc | |
uncomment #force_color_prompt=yes | |
>source ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's been a while since this gist was written. In the meantime the package homeassistant-supervised apt | |
package was introduced for debian based systems. If you used that way the first thing you should do use | |
the normal package uninstaller with something like: (sudo) apt remove homeassistant-supervised | |
If for some reason that doesn't work proceed with the below instructions for a manual cleanup. | |
1) stop services: | |
sudo systemctl stop hassio-supervisor.service | |
sudo systemctl stop hassio-apparmor.service | |
2) disable services: |