Browse Source

Check root

pull/1/head
Luke Childs 5 years ago
parent
commit
fa0d0dc05c
  1. 9
      checkvolumesize

9
checkvolumesize

@ -61,6 +61,13 @@ log () {
echo $prefix$@
}
check_root () {
if [[ $UID != 0 ]]; then
log "This script must be run as root"
exit 1
fi
}
digital_ocean_api () {
endpoint=$1
post_data=$2
@ -97,6 +104,8 @@ check_device_free_space () {
}
main () {
check_root
# TODO: Check dependencies
# TODO: Check required options are set

Loading…
Cancel
Save