Browse Source

Basic testing scripts

Giulio 3 years ago
commit
be4e3b0707
4 changed files with 28 additions and 0 deletions
  1. 9 0
      backup.sh
  2. 7 0
      pull.sh
  3. 6 0
      restore.sh
  4. 6 0
      update.sh

+ 9 - 0
backup.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+mkdir -p /home/user/backup/qubes
+mkdir -p /home/user/backup/qubes/vm/mix/
+mkdir -p /home/user/backup/qubesadmin/
+
+cp /usr/lib/python3.5/qubes/firewall.py /home/user/backup/qubes/
+cp /usr/lib/python3.5/qubes/vm/mix/net.py /home/user/backup/qubes/vm/mix/
+cp /usr/lib/python3.5/qubesadmin/firewall.py /home/user/backup/qubesadmin/

+ 7 - 0
pull.sh

@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+mkdir -p /tmp/core-admin/qubes/
+mkdir -p /tmp/core-admin/qubes/vm/mix/
+mkdir -p /tmp/core-admin-client/qubesadmin/
+scp g@192.168.88.10:/mnt/c/Users/g/Documents/GSOC/sources/core-admin/qubes/firewall.py /tmp/core-admin/qubes/firewall.py
+scp g@192.168.88.10:/mnt/c/Users/g/Documents/GSOC/sources/core-admin/qubes/vm/mix/net.py /tmp/core-admin/qubes/vm/mix/net.py
+scp g@192.168.88.10:/mnt/c/Users/g/Documents/GSOC/sources/core-admin-client/qubesadmin/firewall.py /tmp/core-admin-client/qubesadmin/firewall.py

+ 6 - 0
restore.sh

@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+cp /home/user/backup/qubes/firewall.py /usr/lib/python3.5/qubes/firewall.py
+cp /home/user/backup/qubes/vm/mix/net.py /usr/lib/python3.5/qubes/vm/mix/net.py
+cp /home/user/backup/qubesadmin/firewall.py /usr/lib/python3.5/qubesadmin/firewall.py 
+systemctl restart qubesd

+ 6 - 0
update.sh

@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+qvm-run --pass-io sys-net 'cat /tmp/core-admin/qubes/firewall.py' > /usr/lib/python3.5/qubes/firewall.py
+qvm-run --pass-io sys-net 'cat /tmp/core-admin/qubes/vm/mix/net.py' > /usr/lib/python3.5/qubes/vm/mix/net.py
+qvm-run --pass-io sys-net '/tmp/core-admin-client/qubesadmin/firewall.py' > /usr/lib/python3.5/qubesadmin/firewall.py 
+systemctl restart qubesd