Files
2024-10-14 00:08:40 +02:00

61 lines
1.7 KiB
Perl

#!/usr/bin/perl
use CGI;
$q = new CGI;
$host = $q->param("host");
### HTML Start
printf "Content-type: text/html\n\n";
printf "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n
<html>
<head>
<title>$title</title>
</head>
<body>";
### Ausgabe
my $pd=';';
my $vd='|';
my %path;
if ($host eq "ubuntu1") { # Sony Notebook Ubuntu
# Ubuntu auf Sony VAIO
$path{"/tmp/test1/"} = "1"; # 1: nicht loeschen, 0: loeschen
$path{"\"/tmp/test 2/\""} = "1";
$path{"/tmp/test3/"} = "1";
}
elsif ($host eq "test") {
# Test, existiert nicht
}
elsif ($host eq "arg-nuc") {
$path{'/home/andre/'} = "0";
$path{'/mnt/data/'} = "0";
$path{'/tmp/'} = "0";
$path{'!killall owncloud'} = "1";
$path{'!umount /mnt/*'} = "0";
}
elsif ($host eq "windows-conet") {
$path{'D:\Daten\Users\AWisniewski\Downloads'} = "0";
$path{'D:\Daten\Users\AWisniewski\OC_agadmin'} = "0";
$path{'D:\Administrator'} = "0";
$path{'D:\temp'} = "1";
$path{'C:\temp'} = "1";
}
else {
# Kein Host angegeben
print "Aufruf http://sos.andregeissler.de/cgi-bin/index.cgi?host=HOSTNAME<br>\nServerkonfig<br>\n\$path{\"Pfad mit Leerzeichen\"} = \"x\"; wenn x = 1 dann entfernen anderenfalls nicht.";
}
foreach my $p (keys %path) {
print "$p$vd$path{$p}$pd";
}
print "\n";
### HTML Ende
printf "</body>
</html>";
#################################################################################################################