Category : xcp-ng

# Install Xen: sudo apt-get update sudo apt-get upgrade sudo apt-get install xen-system # Edit interfaces sudo nano /etc/network/interfaces # and add the xen bridge: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto ..

Read more

Setup: sudo su echo “up” > /root/nasstatus.txt Mount point check is a simple empty file sitting at: /mnt/nas/file.txt If this file goes missing, we call speak.sh to say that the NAS is down. nano /root/checkSamba.sh #!/bin/bash FILE=/mnt/nas/file.txt STATUSFILE=/root/nasstatus.txt # keep track of last status NASDOWN=$(cat “$STATUSFILE”) if [ ! -f $FILE ]; then nohup /opt/settings/scripts/speak.sh ..

Read more

As the user (don’t need to be root). # one time setup:  echo “down” > xenstatus.txt checkXenSsh.sh: #!/bin/bash # one time setup: echo “down” > xenstatus.txt STATUSFILE=/home/pi/xenstatus.txt LASTSTATUS=$(cat “$STATUSFILE”) # check connection ssh -q root@xen.florida exit # status of ssh is stored in $? if [ `echo $?` = 255 ]; then nohup /opt/settings/scripts/speak.sh “zen ..

Read more

Using Ubuntu 18. Calling this service “shutdown” sudo nano /etc/systemd/system/shutdown.service Contents. Include the full path to your down.sh shell script. In this example, it’s /opt/settings/scripts/down.sh, and it calls a service using curl which then speaks to a speaker that the server is shutting down.  [Unit] Description=My shutdown [Service] Type=oneshot RemainAfterExit=true ExecStop=/opt/settings/scripts/down.sh [Install] WantedBy=multi-user.target Enable the ..

Read more

First the samba share must exist. Then, go to the linux box, and: Install cifs utils which lets you mount samba shares: Create a credentials file with the login/password to the samba share, and store this credentials file in /etc/ nano /etc/nas.credentials Enter your network share login and password in this nas.credentials file: username=mysambauser password=mysecretpassword ..

Read more