Skip to content

Commit

Permalink
[bugfix] path location did not work when working from cron (e.g. with…
Browse files Browse the repository at this point in the history
…out cwd context), also argument assignment was incorrect (replaced 1 with 0 in @argv)
  • Loading branch information
dougbtv committed Apr 25, 2016
1 parent 10a58d4 commit 807a3e6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/new/homer_mysql_rotate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@
use POSIX;

$version = "1.0.0";
$config = $ARGV[1] // "rotation.ini";
@stepsvalues = (86400, 3600, 1800, 900);

# Determine path and set default rotation.ini location
$script_location = `dirname $0`;
$script_location =~ s/^\s+|\s+$//g;
$default_ini = $script_location."/rotation.ini";

$config = $ARGV[0] // $default_ini;

@stepsvalues = (86400, 3600, 1800, 900);
$AFTER_FIX = 1;

# Optionally load override configuration. perl format
Expand Down

0 comments on commit 807a3e6

Please sign in to comment.