X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=opt%2Fbin%2Fktmux_helper;h=0e48ad4536becc7586cf42b430376755314ed8eb;hp=fe942d4869d5c2537f9a9f1b7a08a42f3f4549d6;hb=fe30b7850bf867b45fb233f351012c97a1b9d068;hpb=b3d407096166f16ef25ad3978b28fd9b5143eccb diff --git a/opt/bin/ktmux_helper b/opt/bin/ktmux_helper index fe942d4..0e48ad4 100755 --- a/opt/bin/ktmux_helper +++ b/opt/bin/ktmux_helper @@ -5,6 +5,7 @@ # Options: -I Specify path to kinit. # -L Specify path to klist. # -R Specify path to krenew. +# -T Specify path to tmux. # Notes: Doesn't handle multiple sessions properly. # @@ -27,11 +28,12 @@ exit 0 if $tmux_helper; $tmux_helper = $$; my %opts; -getopts('I:L:R:', \%opts); +getopts('I:L:R:T:', \%opts); my $kinit = $opts{'I'} || "kinit"; my $klist = $opts{'L'} || "klist"; my $krenew = $opts{'R'} || "krenew"; +my $tmux = $opts{'T'} || "tmux"; my $exitasap = 0; my $pid = 0; @@ -111,7 +113,7 @@ sub check_credentials { sub want_credentials { # Do we already know? return sleep 1 if &check_kinit_child; - system "tmux", "new-window", "-n", "Renew Kerberos credentials", "exec $kinit"; + system $tmux, "new-window", "-n", "Renew Kerberos credentials", "exec $kinit"; } sub cleanup {