added transfer.sh as subcommand

This commit is contained in:
2026-02-01 16:52:22 +01:00
parent 0087bf3622
commit b5a1ba3579

View File

@@ -12,7 +12,8 @@ show_help(){
echo " -y | Answer all questions with yes"
echo ""
echo "-- MODES --"
echo " access | control over remote access to the device (mac-based-filtering using nftables)"
echo " access | control over remote access to the device (mac-based-filtering using nftables)"
echo " transfer | simplified file-transfer with backup-option"
exit 0
}
@@ -35,6 +36,19 @@ if [[ "$1" == "access" ]]; then
exit 0
fi
if [[ "$1" == "transfer" ]]; then
shift
if [[ -x "./sub/transfer.sh" ]]; then
./sub/transfer.sh "$@"
else
echo "Command 'transfer' not found!" >&2
exit 1
fi
exit 0
fi
while getopts ":cyhv" opt; do
case $opt in
c) print_config ;;