if vmXX.txt is passed to notify.pl strip .txt

This commit is contained in:
mischa 2024-05-09 20:26:27 +02:00
parent 6be5987f8d
commit ae548bb979
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ my $function = $ARGV[0] || "empty";
my $function_variable = $ARGV[1] || "empty";
my $message = $ARGV[2] || "empty";
$function_variable = substr $function_variable, 0, -4 if ($function_variable =~ m/.txt/);
# define the prices for the different components of the VM
my $base_price = '67';
my %memory_prices = ('2G' => '10', '4G' => '30', '8G' => '70');