Merge "Scripts to clean disk and shut down"
This commit is contained in:
commit
0f5e04eab0
13
labs/scripts/shutdown.sh
Normal file
13
labs/scripts/shutdown.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
|
||||
source "$TOP_DIR/config/paths"
|
||||
source "$LIB_DIR/functions.guest"
|
||||
|
||||
indicate_current_auto
|
||||
|
||||
exec_logfile
|
||||
|
||||
echo "Shutting down"
|
||||
|
||||
# Shutdown some time after returning so our caller has time to finish
|
||||
sudo -b sh -c 'sleep 2; /sbin/shutdown -P now'
|
12
labs/scripts/zero_empty.sh
Normal file
12
labs/scripts/zero_empty.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
|
||||
source "$TOP_DIR/config/paths"
|
||||
source "$LIB_DIR/functions.guest"
|
||||
|
||||
indicate_current_auto
|
||||
|
||||
exec_logfile
|
||||
|
||||
# Fill unused disk space with zeroes (the disk image is easier to compress when
|
||||
# it doesn't contain leftovers from deleted files)
|
||||
zero_empty_space
|
Loading…
x
Reference in New Issue
Block a user