added transfer.sh as subcommand

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

View File

@@ -13,6 +13,7 @@ show_help(){
echo "" echo ""
echo "-- MODES --" 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 exit 0
} }
@@ -35,6 +36,19 @@ if [[ "$1" == "access" ]]; then
exit 0 exit 0
fi 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 while getopts ":cyhv" opt; do
case $opt in case $opt in
c) print_config ;; c) print_config ;;