#!/bin/sh

plugin_short="tobayer01"
plugin_type="swapskin"
plugin_target="/var/swap/titanskins"

plugin_dir="$plugin_target/$plugin_short"
plugin="$plugin_short $plugin_type"


### FUNCTIONS ###

RES_COL=60									# column number to place the status

echo_success() {							# function to print the OK status
	printf "%-${RES_COL}s%s\n" "$1" "[  OK  ]"
}

echo_failure() {							# function to print the FAILED status
	printf "%-${RES_COL}s%s\n" "$1" "[FAILED]"
}



### MAIN ###

rm -rf $plugin_dir

sync
SPACE=`getfreespace $plugin_target`
FREE=`expr $SPACE - 100`
echo
echo "New free space: $FREE kB"

echo "Successfully removed $plugin."

exit 0
