Commit Diff
Diff:
a3c221cdf90cf90692839a964d8d065c2254c751
0dc24f131c969049a101b195a13d2774ca2a3cd1
Commit:
0dc24f131c969049a101b195a13d2774ca2a3cd1
Tree:
27771625efab740e81ca3239089cc9806290533a
Author:
jrmu <jrmu@ircnow.org>
Committer:
jrmu <jrmu@ircnow.org>
Date:
Tue Mar 7 17:03:40 2023 UTC
Message:
Create folder backups
blob - 90c8df62e7d17bedbb2e2eaf869f927fcb31d163
blob + ca00848cc9c77d18341866ceda9e7294ee276a9f
--- botnow
+++ botnow
@@ -39,7 +39,7 @@ sub readstr {
sub writefile {
my ($filename, $str) = @_;
my $date = date();
- copy($filename, $backuppath.basename($filename).".".date()) or die "Could not make backup of $filename";
+ copy($filename, $backupspath.basename($filename).".".date()) or die "Could not make backup of $filename";
open(my $fh, '>', "$filename") or die "Could not write to $filename";
print $fh $str;
close $fh;
@@ -82,7 +82,7 @@ return "true";
# Path to configuration file
my $confpath = "botnow.conf";
-my $backuppath = "/home/botnow/backups/";
+my $backupspath = "/home/botnow/backups/";
# Configuration variables will be stored in key => value pairs
our %conf;
@@ -198,7 +198,7 @@ my $expires = $conf{expires};
unveil("./", "r") or die "Unable to unveil $!";
unveil("$confpath", "r") or die "Unable to unveil $!";
-unveil("$backuppath", "rwc") or die "Unable to unveil $!";
+unveil("$backupspath", "rwc") or die "Unable to unveil $!";
unveil() or die "Unable to lock unveil $!";
#dns and inet for sockets, proc and exec for figlet
IRCNow