Merge pull request #322 from femtofox/main

Merge main to eth0
This commit is contained in:
noon92 2025-02-12 21:32:45 +02:00 • committed by GitHub
commit db6574790a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View file

@ -112,7 +112,7 @@ package_menu() {
if [ $exit_status -eq 1 ]; then # Exit the loop if the user selects "Cancel" or closes the dialog
return
elif [ $exit_status -eq 2 ]; then # Help ("extra") button
dialog --no-collapse --colors --title "$($package_dir/$1.sh -N) License" --msgbox "$($package_dir/$1.sh -G)" 0 0
dialog --no-collapse --colors --title "$($package_dir/$1.sh -N) License" --msgbox " \Zu$($package_dir/$1.sh -N)\Zn\n$(if output=$($package_dir/$1.sh -T); [ -n "$output" ]; then echo "License: $output"; fi)\n\n$($package_dir/$1.sh -G)" 0 0
else
# execute the actual commands
case $choice in

View file

@ -70,7 +70,18 @@ license() {
echo -e "Contents of $license:\n\n $([[ -f "$license" ]] && awk -v max=2000 -v file="$license" '{ len += length($0) + 1; if (len <= max) print; else if (!cut) { cut=1; printf "%s...\n\nFile truncated, see %s for complete license.", substr($0, 1, max - len + length($0)), file; exit } }' "$license")"
}
## custom getopts example for this package
# if [[ "$1" == "-k" ]]; then
# generate_keys
# fi
# parse arguments
source /usr/local/bin/packages/femto_argument_parse.sh "$@"
# extra help example for this package
# if [[ "$1" == "-h" ]]; then
# echo -e "Additional argument for this package:\n\
# -k Generate SSL keys. Must be first argument."
# fi
exit 0

View file

@ -93,7 +93,18 @@ generate_keys() {
fi
}
# custom getopts for ttyd: generate key
if [[ "$1" == "-k" ]]; then
generate_keys
fi
# parse arguments
source /usr/local/bin/packages/femto_argument_parse.sh "$@"
# extra help for this package
if [[ "$1" == "-h" ]]; then
echo -e "Additional argument for this package:\n\
-k Generate SSL keys. Must be first argument."
fi
exit 0