Standardize function import
This commit is contained in:
@@ -5,13 +5,17 @@
|
||||
parent="${BASH_SOURCE[0]}"
|
||||
parent=${parent%/*}
|
||||
|
||||
[[ -f "$parent"/script-functions ]] && . "$parent"/script-functions || exit 1
|
||||
[[ -f $parent/script-functions ]] && . "$parent"/script-functions || exit 1
|
||||
|
||||
is_root
|
||||
|
||||
[[ $# -lt 1 ]] && echo "No username provided!" && exit 1
|
||||
[[ $# -ge 1 ]] && user="$1"
|
||||
echo "This script supports one optional argument, a username"
|
||||
|
||||
if [[ $# -eq 1 ]]; then
|
||||
user="$1"
|
||||
else
|
||||
prompt user
|
||||
fi
|
||||
|
||||
# Clean local user cache
|
||||
rm -rf /home/"$user"/.x2go/C-"$user"-*
|
||||
|
||||
Reference in New Issue
Block a user