Skip to content

Commit 21cde21

Browse files
committed
update README-gpl-csf.md
1 parent f9d86ac commit 21cde21

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

README-gpl-csf.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,60 @@ index a3e8876..016ecb6 100755
112112
system("rm -f /var/lib/configserver/*.txt /var/lib/configserver/*error");
113113
```
114114

115+
```diff
116+
diff --git a/csf/ConfigServer/Config.pm b/csf/ConfigServer/Config.pm
117+
index f854b29..f7a4648 100644
118+
--- a/csf/ConfigServer/Config.pm
119+
+++ b/csf/ConfigServer/Config.pm
120+
@@ -1,7 +1,20 @@
121+
###############################################################################
122+
-# Copyright 2006-2023, Way to the Web Limited
123+
-# URL: http://www.configserver.com
124+
-# Email: sales@waytotheweb.com
125+
+# Copyright (C) 2006-2025 Jonathan Michaelson
126+
+#
127+
+# https://github.com/waytotheweb/scripts
128+
+#
129+
+# This program is free software; you can redistribute it and/or modify it under
130+
+# the terms of the GNU General Public License as published by the Free Software
131+
+# Foundation; either version 3 of the License, or (at your option) any later
132+
+# version.
133+
+#
134+
+# This program is distributed in the hope that it will be useful, but WITHOUT
135+
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
136+
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
137+
+# details.
138+
+#
139+
+# You should have received a copy of the GNU General Public License along with
140+
+# this program; if not, see <https://www.gnu.org/licenses>.
141+
###############################################################################
142+
## no critic (RequireUseWarnings, ProhibitExplicitReturnUndef, ProhibitMixedBooleanOperators, RequireBriefOpen)
143+
# start main
144+
@@ -429,21 +442,13 @@ sub getdownloadserver {
145+
my $downloadservers = "/etc/csf/downloadservers";
146+
my $chosen;
147+
if (-e $downloadservers) {
148+
-## open (my $DOWNLOAD, "<", $downloadservers);
149+
-## flock ($DOWNLOAD, LOCK_SH);
150+
-## my @data = <$DOWNLOAD>;
151+
-## close ($DOWNLOAD);
152+
-## chomp @data;
153+
-## foreach my $line (@data) {
154+
-## if ($line =~ /^download/) {push @servers, $line}
155+
-## }
156+
foreach my $line (slurp($downloadservers)) {
157+
$line =~ s/$cleanreg//g;
158+
if ($line =~ /^download/) {push @servers, $line}
159+
}
160+
$chosen = $servers[rand @servers];
161+
}
162+
- if ($chosen eq "") {$chosen = "download.configserver.com"}
163+
+## if ($chosen eq "") {$chosen = "download.configserver.com"}
164+
return $chosen;
165+
}
166+
## end getdownloadserver
167+
```
168+
115169
#### License Headers (All Files)
116170

117171
Every source file updated with GPLv3 boilerplate:

0 commit comments

Comments
 (0)