@@ -45,6 +45,7 @@ usage() {
|
||||
-v|--void # Don't add the file to my files.
|
||||
-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.
|
||||
-l|--login <username> # Get a login token sent to email for <username>
|
||||
|
||||
Config options (~/.config/ufw):
|
||||
secret # Your personal token. Get it at https://8fw.me/settings_form
|
||||
@@ -242,7 +243,7 @@ get_my_ip() {
|
||||
}
|
||||
|
||||
login() {
|
||||
declare api_response
|
||||
declare api_response login=$1
|
||||
|
||||
api_response=$( curl "$cfg_service_url/token_request.json?login=$login" )
|
||||
|
||||
@@ -255,7 +256,6 @@ login() {
|
||||
|
||||
get_token() {
|
||||
[[ $secret ]] && return 0
|
||||
[[ -f $cfg_file ]] && return 1
|
||||
|
||||
declare api_response login password
|
||||
|
||||
@@ -463,7 +463,7 @@ main() {
|
||||
;;
|
||||
|
||||
getmyip) get_my_ip;;
|
||||
login) login;;
|
||||
login) login "${args[0]}";;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ msg() { printf '%s\n' "$*"; }
|
||||
err() { echo "$*" >&2; }
|
||||
|
||||
usage() {
|
||||
printf 'Usage: ufwd [-hn] [-d workdir] -D [check delay]\n'
|
||||
printf 'Usage: ufwd [flags]\n'
|
||||
printf ' -h # Show this message.\n'
|
||||
printf ' -n # Enable notifications with notify-send. Must be installed.\n'
|
||||
printf ' -d [path] # Set the dir that is to be watched.\n'
|
||||
|
||||
Reference in New Issue
Block a user