From 53c157d02387b515f82f56942590bf125a937e0d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 12 May 2019 12:56:11 +0200 Subject: [PATCH 1/2] install tmpfs added in install_server bash and fstab file added to installation --- install_server.sh | 4 ++++ installation/fstab | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 installation/fstab diff --git a/install_server.sh b/install_server.sh index dc4a2bb..65fb11c 100755 --- a/install_server.sh +++ b/install_server.sh @@ -11,6 +11,10 @@ service munin-node restart # Disable internal sound echo "blacklist snd_bcm2835" > /etc/modprobe.d/internalsnd-blacklist.conf +#setup tmpfs +echo "d /var/log/supervisor 0777 root root" > /etc/tmpfiles.d/supervisor.conf +cp installation/fstab /etc/fstab + # Added chown=pi:pi cp installation/supervisord.conf /etc/supervisor/supervisord.conf ln -s /home/pi/hugvey/supervisor.conf /etc/supervisor/conf.d/hugvey.conf diff --git a/installation/fstab b/installation/fstab new file mode 100644 index 0000000..2effb2e --- /dev/null +++ b/installation/fstab @@ -0,0 +1,9 @@ +proc /proc proc defaults 0 0 +PARTUUID=61a67ebb-01 /boot vfat defaults 0 2 +PARTUUID=61a67ebb-02 / ext4 defaults,noatime 0 1 +# a swapfile is not a swap partition, no line here +# use dphys-swapfile swap[on|off] for that +#change /tmp and var log to tmpfs +tmpfs /tmp tmpfs rw,nosuid,nodev 0 0 +tmpfs /var/log tmpfs rw,nosuid,nodev 0 0 + From 45744fb5e466349956f6cc097a7a708ac2d57892 Mon Sep 17 00:00:00 2001 From: Hugvey Central Command Date: Sun, 12 May 2019 14:42:50 +0200 Subject: [PATCH 2/2] updated README --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed16384..d1c5994 100644 --- a/README.md +++ b/README.md @@ -92,18 +92,27 @@ chown=pi:pi ## Deploy / usefull commands +rsync them all ```bash for i in {1..26}; do echo $i; rsync -av ~/hugvey/ pi@hugvey$i.local:/home/pi/hugvey/ --exclude=www --exclude=venv --exclude=local --exclude=*.pyc --exclude=.git --exclude=recordings --exclude=/voice* --exclude=/pd; done ``` +shut all of them down ```bash -for i in {1..6}; do ssh pi@hugvey$i.local "sudo shutdown -h now"; done +for i in {1..26}; do ssh pi@hugvey$i.local "sudo shutdown -h now"; done ``` +restart supervisor on all of them ```bash -for i in {1..6}; do ssh pi@hugvey$i.local "supervisorctl restart hugvey_client"; done +for i in {1..26}; do ssh pi@hugvey$i.local "supervisorctl restart hugvey_client"; done ``` +install bash on all of them +```bash +for i in {1..26}; do echo $i;ssh pi@hugvey$i.local "cd hugvey && sudo bash install_server.sh"; done +``` + + ### Monitoring the server processes @@ -205,3 +214,12 @@ times occured/only on n-th instance: determines the order of diversions of the s Visit 192.168.5.1 The password is at the bottom of the device. + + +# Restoring a hugvey + +- Write image `/mnt/stash/hugvey.img` to the microSD card. + + You can use `gnome-disks` 'restore image' for that +- Open partition called rootfs, and `sudo nano etc/hostname` + + Change hugvey20 into hugveyX (the number you need) +- Start it, rsync, install_server.sh as mentioned above.