aboutsummaryrefslogtreecommitdiff
path: root/tgrecv
diff options
context:
space:
mode:
authorGuillermo Ramos2019-06-21 10:46:29 +0200
committerGuillermo Ramos2019-06-21 10:46:29 +0200
commitc6eceb0aad4e5e3a7ebfd18825b4e68788895dfe (patch)
tree15960e18cc494812258e222b1546927ffe0dafc1 /tgrecv
parentd917006033c8ddca0c4c34b235058abe9176e94f (diff)
downloadtgutils-c6eceb0aad4e5e3a7ebfd18825b4e68788895dfe.tar.gz
TGUTILS_TOKEN instead of separate TGRECV/TGSEND
Diffstat (limited to 'tgrecv')
-rwxr-xr-xtgrecv12
1 files changed, 6 insertions, 6 deletions
diff --git a/tgrecv b/tgrecv
index c127523..beaa24b 100755
--- a/tgrecv
+++ b/tgrecv
@@ -33,12 +33,12 @@ GetOptions("token=s" => \$TOKEN,
pod2usage(-verbose => $VERBOSE+1) if $HELP;
# If token was not specified in CLI, try to get it from ENV
-$TOKEN ||= $ENV{'TGRECV_TOKEN'};
+$TOKEN ||= $ENV{'TGUTILS_TOKEN'};
-# If still no token, try to get it from ~/.config/tgrecv_token
+# If still no token, try to get it from ~/.config/tgutils_token
unless ($TOKEN) {
my $CONFIG_HOME = $ENV{'XDG_CONFIG_HOME'} || $ENV{'HOME'} . "/.config";
- my $CONFIG = "$CONFIG_HOME/tgrecv_token";
+ my $CONFIG = "$CONFIG_HOME/tgutils_token";
open(my $cfg, "<", $CONFIG) or
pod2usage(-message => "ERROR: Unable to get bot token ($CONFIG: $!).\n",
-verbose => 99, -sections => "AUTHENTICATION");
@@ -107,8 +107,8 @@ is available before exiting.
To get the bot token, this program will check (in order):
- The "--token" CLI argument
- - The "TGRECV_TOKEN" environment variable
- - The contents of "$XDG_CONFIG_HOME/tgrecv_token"
- (usually ~/.config/tgrecv_token)
+ - The "TGUTILS_TOKEN" environment variable
+ - The contents of "$XDG_CONFIG_HOME/tgutils_token"
+ (usually ~/.config/tgutils_token)
=cut