Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental #87

Merged
merged 5 commits into from
May 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commands/system/packages/removepackage-csf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ OUTTO="/root/quick-box.log"
function _removeCSF() {
cd /etc/csf
sh uninstall.sh >>"${OUTTO}" 2>&1;
rm /install/.csf.lock
}

_removeCSF
3 changes: 2 additions & 1 deletion quickbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1364,6 +1364,7 @@ function _autodl() {
cp autodl-irssi.pl autorun/
mkdir -p "/home/${username}/.autodl" >>"${OUTTO}" 2>&1
touch "/home/${username}/.autodl/autodl.cfg"
touch /install/.autodlirssi.lock

cat >"/home/${username}/.autodl/autodl2.cfg"<<ADC
[options]
Expand Down Expand Up @@ -1631,7 +1632,7 @@ function _packagecommands() {
mkdir -p /etc/quickbox/commands/system/packages
mv "${PACKAGEURL}" /etc/quickbox/commands/system/
PACKAGECOMMANDS="/etc/quickbox/commands/system/packages/"; cd "/usr/local/bin"
LIST="installpackage-plex removepackage-plex installpackage-btsync removepackage-btsync"
LIST="installpackage-plex removepackage-plex installpackage-btsync removepackage-btsync installpackage-csf removepackage-csf"
for i in $LIST; do
#echo -ne "Setting Up and Initializing Plugin Command: ${green}${i}${normal} "
cp -R "${PACKAGECOMMANDS}$i" .
Expand Down
2 changes: 1 addition & 1 deletion rutorrent/home/inc/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'author' => 'Everyone that contributes to the open QuickBox project!',
'robots' => 'noindex, nofollow',
'title' => 'Your Quickbox Seedbox Panel',
'description' => 'QuickBox is an open-source seedbox project that is developed and maintain by anyone who so choses to provide time and energy. QuickBox has been made possible by the Team at Swizards. See Swizards.net',
'description' => 'QuickBox is an open-source seedbox project that is developed and maintained by anyone who so choses to provide time and energy. QuickBox has been made possible by the Team at Swizards. See Swizards.net. For more QuickBox, checkout https://plaza.quickbox.io',
'active_page' => basename($_SERVER['PHP_SELF']),
);

Expand Down
21 changes: 15 additions & 6 deletions rutorrent/home/inc/panel.menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,29 @@
echo "<ul class=\"children\">";
echo "<li class=\"info-quote\"><p class=\"info-quote\">Easily install and uninstall any software package simply by clicking on the software package name</p></li>";
echo "<li class=\"warning-quote\"><p class=\"warning-quote\">Please be advised that these options are not the same as enabling and disabling a software package. These options are designed to either install or uninstall.</p></li>";

echo "<li>";
if (file_exists('/srv/rutorrent/home/.plex')) {
echo "<a href=\"javascript:void()\" data-toggle=\"modal\" data-target=\"#plexRemovalConfirm\">Plex Media Server : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-installed.png\"></span></a>";
if (file_exists("/install/.btsync.lock")) {
echo "<a href=\"javascript:void()\" data-toggle=\"modal\" data-target=\"#btsyncRemovalConfirm\">BTSync : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-installed.png\"></span></a>";
} else {
echo "<a href=\"?installpackage-plex=true\" id=\"plexInstall\">Plex Media Server : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-notinstalled.png\"></span></a>";
echo "<a href=\"?installpackage-btsync=true\" id=\"btsyncInstall\">BTSync : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-notinstalled.png\"></span></a>";
}
echo "</li>";
echo "<li>";
if (file_exists("/run/btsync/btsync.pid")) {
echo "<a href=\"javascript:void()\" data-toggle=\"modal\" data-target=\"#btsyncRemovalConfirm\">BTSync : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-installed.png\"></span></a>";
if (file_exists("/install/.csf.lock")) {
echo "<a href=\"javascript:void()\" data-toggle=\"modal\" data-target=\"#csfRemovalConfirm\">CSF : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-installed.png\"></span></a>";
} else {
echo "<a href=\"?installpackage-btsync=true\" id=\"btsyncInstall\">BTSync : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-notinstalled.png\"></span></a>";
echo "<a href=\"?installpackage-csf=true\" id=\"csfInstall\">CSF : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-notinstalled.png\"></span></a>";
}
echo "</li>";
echo "<li>";
if (file_exists('/install/.plex.lock')) {
echo "<a href=\"javascript:void()\" data-toggle=\"modal\" data-target=\"#plexRemovalConfirm\">Plex Media Server : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-installed.png\"></span></a>";
} else {
echo "<a href=\"?installpackage-plex=true\" id=\"plexInstall\">Plex Media Server : <span class=\"pull-right plgin-center-switch\"><img src=\"img/switch-notinstalled.png\"></span></a>";
}
echo "</li>";

echo "</ul>";
echo "</li>";
} ?>
Expand Down
38 changes: 28 additions & 10 deletions rutorrent/home/inc/panel.scripts.php
Original file line number Diff line number Diff line change
@@ -1,37 +1,55 @@
</section>

<!-- PLEX UNINSTALL MODAL -->
<div class="modal bounceIn animated" id="plexRemovalConfirm" tabindex="-1" role="dialog" aria-labelledby="PlexRemovalConfirm" aria-hidden="true">
<!-- BTSYNC UNINSTALL MODAL -->
<div class="modal bounceIn animated" id="btsyncRemovalConfirm" tabindex="-1" role="dialog" aria-labelledby="BTSyncRemovalConfirm" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="PlexRemovalConfirm">Uninstall Plex?</h4>
<h4 class="modal-title" id="BTSyncRemovalConfirm">Uninstall BTSync?</h4>
</div>
<div class="modal-body">
You are about to uninstall Plex Media Server from your system.<br/><br/>This will completely remove all of your configuration and library settings... this action is irreversable. <br/><br/>You may reinstall Plex at any time, however, your library settings will be reset to default.
You are about to uninstall BitTorrent Sync from your system.<br/><br/>This will completely remove all of your configuration and shared folder settings... this action is irreversable. <br/><br/>You may reinstall BitTorrent Sync at any time, however, your storage path and linked folder settings will be reset to default.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<a href="?removepackage-plex=true" id="plexRemove" class="btn btn-primary">I understand, do it!</a>
<a href="?removepackage-btsync=true" id="btsyncRemove" class="btn btn-primary">I understand, do it!</a>
</div>
</div><!-- modal-content -->
</div><!-- modal-dialog -->
</div><!-- modal -->
<!-- BTSYNC UNINSTALL MODAL -->
<div class="modal bounceIn animated" id="btsyncRemovalConfirm" tabindex="-1" role="dialog" aria-labelledby="BTSyncRemovalConfirm" aria-hidden="true">
<!-- CSF UNINSTALL MODAL -->
<div class="modal bounceIn animated" id="csfRemovalConfirm" tabindex="-1" role="dialog" aria-labelledby="CSFRemovalConfirm" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="BTSyncRemovalConfirm">Uninstall BTSync?</h4>
<h4 class="modal-title" id="CSFRemovalConfirm">Uninstall Config Server Firewall?</h4>
</div>
<div class="modal-body">
You are about to uninstall BitTorrent Sync from your system.<br/><br/>This will completely remove all of your configuration and shared folder settings... this action is irreversable. <br/><br/>You may reinstall BitTorrent Sync at any time, however, your storage path and linked folder settings will be reset to default.
You are about to uninstall Config Server Firewall (CSF) from your system.<br/><br/>This will completely remove all of your configuration settings... this action is irreversable. <br/><br/>You may reinstall Config Server Firewall (CSF) at any time, however, your configuration settings (if any changes were made) will be reset to default.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<a href="?removepackage-btsync=true" id="btsyncRemove" class="btn btn-primary">I understand, do it!</a>
<a href="?removepackage-csf=true" id="csfRemove" class="btn btn-primary">I understand, do it!</a>
</div>
</div><!-- modal-content -->
</div><!-- modal-dialog -->
</div><!-- modal -->
<!-- PLEX UNINSTALL MODAL -->
<div class="modal bounceIn animated" id="plexRemovalConfirm" tabindex="-1" role="dialog" aria-labelledby="PlexRemovalConfirm" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="PlexRemovalConfirm">Uninstall Plex?</h4>
</div>
<div class="modal-body">
You are about to uninstall Plex Media Server from your system.<br/><br/>This will completely remove all of your configuration and library settings... this action is irreversable. <br/><br/>You may reinstall Plex at any time, however, your library settings will be reset to default.
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<a href="?removepackage-plex=true" id="plexRemove" class="btn btn-primary">I understand, do it!</a>
</div>
</div><!-- modal-content -->
</div><!-- modal-dialog -->
Expand Down
56 changes: 40 additions & 16 deletions rutorrent/home/widgets/package_data.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,66 @@
<?php
if ($_GET['installpackage-plex']) {

if ($_GET['installpackage-btsync']) {
//header('Location: /');
header('Refresh: 15; /');
writeMsg("Hello <b>$username</b>: I am completing the installation of the <b>Plex Media Server</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the installation of the <b>Plex Media Server</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/installpackage-plex");
writeMsg("Hello <b>$username</b>: I am completing the installation of the <b>BTSync</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the installation of the <b>BTSync</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br><br>";
shell_exec("sudo /usr/local/bin/installpackage-btsync");
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
$newURL = $myURL;
}
if ($_GET['removepackage-plex']) {
if ($_GET['removepackage-btsync']) {
//header('Location: /');
header('Refresh: 15; /');
writeMsg("Hello <b>$username</b>: I am completing the removal of the <b>Plex Media Server</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the removal of the <b>Plex Media Server</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/removepackage-plex");
writeMsg("Hello <b>$username</b>: I am completing the removal of the <b>BTSync</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the removal of the <b>BTSync</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/removepackage-btsync");
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
$newURL = $myURL;
}
if ($_GET['installpackage-btsync']) {

if ($_GET['installpackage-csf']) {
//header('Location: /');
header('Refresh: 15; /');
writeMsg("Hello <b>$username</b>: I am completing the installation of the <b>BTSync</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the installation of the <b>BTSync</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br><br>";
shell_exec("sudo /usr/local/bin/installpackage-btsync");
writeMsg("Hello <b>$username</b>: I am completing the installation of the <b>Config Server Firewall (CSF)</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the installation of the <b>Config Server Firewall (CSF)</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br><br>";
shell_exec("sudo /usr/local/bin/installpackage-csf");
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
$newURL = $myURL;
}
if ($_GET['removepackage-btsync']) {
if ($_GET['removepackage-csf']) {
//header('Location: /');
header('Refresh: 15; /');
writeMsg("Hello <b>$username</b>: I am completing the removal of the <b>BTSync</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the removal of the <b>BTSync</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/removepackage-btsync");
writeMsg("Hello <b>$username</b>: I am completing the removal of the <b>Config Server Firewall (CSF)</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the removal of the <b>Config Server Firewall (CSF)</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/removepackage-csf");
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
$newURL = $myURL;
}

if ($_GET['installpackage-plex']) {
//header('Location: /');
header('Refresh: 15; /');
writeMsg("Hello <b>$username</b>: I am completing the installation of the <b>Plex Media Server</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the installation of the <b>Plex Media Server</b> package. Your browser will refresh once more when the installation has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/installpackage-plex");
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
$newURL = $myURL;
}
if ($_GET['removepackage-plex']) {
//header('Location: /');
header('Refresh: 15; /');
writeMsg("Hello <b>$username</b>: I am completing the removal of the <b>Plex Media Server</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>");
$message = "Hello <b>$username</b>: I am completing the removal of the <b>Plex Media Server</b> package. Your browser will refresh once more when the uninstall has fully completed, this may take upwards of 15 seconds ... <br>";
shell_exec("sudo /usr/local/bin/removepackage-plex");
$myUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && !in_array(strtolower($_SERVER['HTTPS']),array('off','no'))) ? 'https' : 'http';
$myUrl .= '://'.$_SERVER['HTTP_HOST'];
$newURL = $myURL;
}

?>