-
Notifications
You must be signed in to change notification settings - Fork 0
/
zenpacklab.php
37 lines (29 loc) · 898 Bytes
/
zenpacklab.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
$author = $_GET["author"];
$packname = $_GET["packname"];
$version = $_GET["version"];
$symlink = $_GET["symlink"];
echo "Generating ZenPack<br>";
chdir('CustomScriptBuilder');
if ( !is_null($_GET["nagios"]) )
{
if ( $_GET["symlink"] )
{
$makepack_out = shell_exec("/bin/bash makepack.sh -a '".$author."' -n $packname -v $version -p -s");
}else{
$makepack_out = shell_exec("/bin/bash makepack.sh -a '".$author."' -n $packname -v $version -p");
}
}else{
if ( $_GET["symlink"] )
{
$makepack_out = shell_exec("/bin/bash makepack.sh -a '".$author."' -n $packname -v $version -s");
}else{
$makepack_out = shell_exec("/bin/bash makepack.sh -a '".$author."' -n $packname -v $version");
}
}
$eggs = glob("*.egg");
foreach($eggs as $egg) {
echo "<a href='CustomScriptBuilder/$egg'>$egg</a><br>";
}
?>
<a href='/'>Start Again</a>