From a3d0fa408074e54901b4b0c7d5a1c33dc04d4fe1 Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Tue, 2 Jun 2020 15:09:46 +0200 Subject: [PATCH] [GLOBAL] Organized scripts --- FreeBSD/{ => jail}/jail-backup.csh | 0 FreeBSD/{ => jail}/jail-update.csh | 0 FreeBSD/{ => other}/url-check.csh | 0 FreeBSD/{ => storage}/partition-disk-zfs.md | 0 FreeBSD/{ => vm}/vcreate.csh | 14 ++++++++------ FreeBSD/{ => vm}/vm-backup-single.bash | 0 FreeBSD/{ => vm}/vm-backup-single.csh | 0 FreeBSD/{ => vm}/vm-backup.csh | 0 8 files changed, 8 insertions(+), 6 deletions(-) rename FreeBSD/{ => jail}/jail-backup.csh (100%) rename FreeBSD/{ => jail}/jail-update.csh (100%) rename FreeBSD/{ => other}/url-check.csh (100%) rename FreeBSD/{ => storage}/partition-disk-zfs.md (100%) rename FreeBSD/{ => vm}/vcreate.csh (93%) rename FreeBSD/{ => vm}/vm-backup-single.bash (100%) rename FreeBSD/{ => vm}/vm-backup-single.csh (100%) rename FreeBSD/{ => vm}/vm-backup.csh (100%) diff --git a/FreeBSD/jail-backup.csh b/FreeBSD/jail/jail-backup.csh similarity index 100% rename from FreeBSD/jail-backup.csh rename to FreeBSD/jail/jail-backup.csh diff --git a/FreeBSD/jail-update.csh b/FreeBSD/jail/jail-update.csh similarity index 100% rename from FreeBSD/jail-update.csh rename to FreeBSD/jail/jail-update.csh diff --git a/FreeBSD/url-check.csh b/FreeBSD/other/url-check.csh similarity index 100% rename from FreeBSD/url-check.csh rename to FreeBSD/other/url-check.csh diff --git a/FreeBSD/partition-disk-zfs.md b/FreeBSD/storage/partition-disk-zfs.md similarity index 100% rename from FreeBSD/partition-disk-zfs.md rename to FreeBSD/storage/partition-disk-zfs.md diff --git a/FreeBSD/vcreate.csh b/FreeBSD/vm/vcreate.csh similarity index 93% rename from FreeBSD/vcreate.csh rename to FreeBSD/vm/vcreate.csh index 2e38b35..8ddd98f 100644 --- a/FreeBSD/vcreate.csh +++ b/FreeBSD/vm/vcreate.csh @@ -1,7 +1,14 @@ #!/bin/csh -f +# set arguments set HOSTNAME=$1 set IP=$2 +if ( $3 == "" ) then + set SIZE=20G +else + set SIZE=$3 +endif + # set static variables set VM=/usr/local/sbin/vm set TEMPLATE=ubuntu-small @@ -10,12 +17,7 @@ set PUBKEY=/home/simon/.ssh/id_ed25519.pub set NAMESERVER=192.168.10.254 set GATEWAY=192.168.10.254 -if ( $3 == "" ) then - set SIZE=20G -else - set SIZE=$3 -endif - +# create vm $VM create \ -t $TEMPLATE \ -s $SIZE \ diff --git a/FreeBSD/vm-backup-single.bash b/FreeBSD/vm/vm-backup-single.bash similarity index 100% rename from FreeBSD/vm-backup-single.bash rename to FreeBSD/vm/vm-backup-single.bash diff --git a/FreeBSD/vm-backup-single.csh b/FreeBSD/vm/vm-backup-single.csh similarity index 100% rename from FreeBSD/vm-backup-single.csh rename to FreeBSD/vm/vm-backup-single.csh diff --git a/FreeBSD/vm-backup.csh b/FreeBSD/vm/vm-backup.csh similarity index 100% rename from FreeBSD/vm-backup.csh rename to FreeBSD/vm/vm-backup.csh