minor fixes

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-27 21:50:53 +00:00
parent 32e9f9c758
commit 8158c13801
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -45,6 +45,7 @@ usage() {
-v|--void # Don't add the file to my files. -v|--void # Don't add the file to my files.
-c|--clipboard # Throw the result into the clipboard -c|--clipboard # Throw the result into the clipboard
-i|--my-ip # Get the IP you're reaching the service with, usually it will be your public address. -i|--my-ip # Get the IP you're reaching the service with, usually it will be your public address.
-l|--login <username> # Get a login token sent to email for <username>
Config options (~/.config/ufw): Config options (~/.config/ufw):
secret # Your personal token. Get it at https://8fw.me/settings_form secret # Your personal token. Get it at https://8fw.me/settings_form
@@ -242,7 +243,7 @@ get_my_ip() {
} }
login() { login() {
declare api_response declare api_response login=$1
api_response=$( curl "$cfg_service_url/token_request.json?login=$login" ) api_response=$( curl "$cfg_service_url/token_request.json?login=$login" )
@@ -255,7 +256,6 @@ login() {
get_token() { get_token() {
[[ $secret ]] && return 0 [[ $secret ]] && return 0
[[ -f $cfg_file ]] && return 1
declare api_response login password declare api_response login password
@@ -463,7 +463,7 @@ main() {
;; ;;
getmyip) get_my_ip;; getmyip) get_my_ip;;
login) login;; login) login "${args[0]}";;
esac esac
} }
+1 -1
View File
@@ -10,7 +10,7 @@ msg() { printf '%s\n' "$*"; }
err() { echo "$*" >&2; } err() { echo "$*" >&2; }
usage() { usage() {
printf 'Usage: ufwd [-hn] [-d workdir] -D [check delay]\n' printf 'Usage: ufwd [flags]\n'
printf ' -h # Show this message.\n' printf ' -h # Show this message.\n'
printf ' -n # Enable notifications with notify-send. Must be installed.\n' printf ' -n # Enable notifications with notify-send. Must be installed.\n'
printf ' -d [path] # Set the dir that is to be watched.\n' printf ' -d [path] # Set the dir that is to be watched.\n'