Commit Diff
Diff:
2c54c47e6fbc505a003308f033305c0fabb93b04
c8e9176570263fe014d2433fd99a008e2262ad70
Commit:
c8e9176570263fe014d2433fd99a008e2262ad70
Tree:
f31a3246985bdd9fce04cf89fa20d26857351b0a
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Sun Mar 12 02:31:18 2023 UTC
Message:
Fixed regex bug that would cause relayd.conf to get wiped out
blob - 4fd564078647a45b9e29ecf1cefc9a90ffb0797c
blob + 575e562477e906594406851c68b5caf0e3d7f87d
--- Shell.pm
+++ Shell.pm
@@ -433,6 +433,9 @@ sub configurerelayd {
my $newconf;
if ($relaydconf =~ /^.*tls\s+{\s+keypair\s+[.0-9a-zA-Z]+\s*}/m) {
$newconf = "$`$&\n\t$block$'";
+ } else {
+ $newconf = $relaydconf;
+ main::debug(ERROR, "ERROR: regex can't match tls { keypair \$username.$hostname }");
}
main::writefile($relaydconfpath, $newconf);
}
IRCNow