added transfer.sh as subcommand
This commit is contained in:
@@ -12,7 +12,8 @@ show_help(){
|
|||||||
echo " -y | Answer all questions with yes"
|
echo " -y | Answer all questions with yes"
|
||||||
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 ;;
|
||||||
|
|||||||
Reference in New Issue
Block a user