From 880c6fff00f523d38088d26c88c8491debaa9a03 Mon Sep 17 00:00:00 2001
From: MB-Finski <64466176+MB-Finski@users.noreply.github.com>
Date: Sun, 2 Oct 2022 22:09:38 +0300
Subject: [PATCH 1/4] Change backup directory for docker compatibility
Improve docker compatibility: Change the backup directory for ./nextcloud/data to reside within the host file system (basedir) so as to avoid moving the data folder back and forth between the docker container and the host file system. In situations where the nextcloud data takes up more than the free available space on the host system, this may lead to loosing some or all of the data.
Signed-off-by: MB-Finski <64466176+MB-Finski@users.noreply.github.com>
---
bin/ncp-update-nc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc
index 60e8486f0..e3f8417c0 100755
--- a/bin/ncp-update-nc
+++ b/bin/ncp-update-nc
@@ -165,7 +165,7 @@ rollback() {
rm -rf /var/www/nextcloud.tar.bz2 "$BASEDIR"/nextcloud-old
echo "Rolling back to backup $BKP..."
local TMPDATA
- TMPDATA="$( mktemp -d "/var/www/ncp-data.XXXXXX" )" || { echo "Failed to create temp dir" >&2; exit 1; }
+ TMPDATA="$( mktemp -d "$BASEDIR/recovery/ncp-data.XXXXXX" )" || { echo "Failed to create temp dir" >&2; exit 1; }
[[ "$DATADIR" == "$BASEDIR/nextcloud/data" ]] && mv -T "$DATADIR" "$TMPDATA"
ncp-restore "$BKP" || { echo "Rollback failed! Data left at $TMPDATA"; exit 1; }
[[ "$DATADIR" == "$BASEDIR/nextcloud/data" ]] && { rm -rf "$DATADIR"; mv -T "$TMPDATA" "$DATADIR"; }
From 04729604ee3319b347d7e358c85f3cf4be3f511e Mon Sep 17 00:00:00 2001
From: coltkondo
Date: Mon, 26 Sep 2022 22:11:18 -0400
Subject: [PATCH 2/4] Fixed: Nextcloudpi icon pointing to ownyoursbits.com
#1571
---
ncp-web/index.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ncp-web/index.php b/ncp-web/index.php
index e7e3f5390..17045474a 100644
--- a/ncp-web/index.php
+++ b/ncp-web/index.php
@@ -134,7 +134,7 @@
GPL licensed (see end of file) * Use at your own risk!
diff --git a/ncp-web/csrf.php b/ncp-web/csrf.php
index 34d0fc03f..9fd100e2e 100644
--- a/ncp-web/csrf.php
+++ b/ncp-web/csrf.php
@@ -1,6 +1,6 @@
* GPL licensed (see end of file) * Use at your own risk!
diff --git a/ncp-web/decrypt/CSS.css b/ncp-web/decrypt/CSS.css
index a687c9be5..b68983e11 100644
--- a/ncp-web/decrypt/CSS.css
+++ b/ncp-web/decrypt/CSS.css
@@ -1,5 +1,5 @@
-/*
- * NextCloudPi Web Panel style sheets. Based on official Nextcloud 12 datasheets
+/*
+ * NextcloudPi Web Panel style sheets. Based on official Nextcloud 12 datasheets
*
* Copyleft 2018 by Ignacio Nunez Hernanz
* GPL licensed (see end of file) * Use at your own risk!
diff --git a/ncp-web/decrypt/JS.js b/ncp-web/decrypt/JS.js
index 91d6149c1..f670c90c9 100644
--- a/ncp-web/decrypt/JS.js
+++ b/ncp-web/decrypt/JS.js
@@ -1,5 +1,5 @@
///
-// NextCloudPi Web Panel javascript library
+// NextcloudPi Web Panel javascript library
//
// Copyleft 2017 by Ignacio Nunez Hernanz
// GPL licensed (see end of file) * Use at your own risk!
@@ -11,22 +11,22 @@ var MINI = require('minified');
var $ = MINI.$, $$ = MINI.$$, EE = MINI.EE;
function errorMsg()
-{
- $('#error-box').fill("Something went wrong. Try refreshing the page");
+{
+ $('#error-box').fill("Something went wrong. Try refreshing the page");
}
-function decrypt_ok_cb(result)
+function decrypt_ok_cb(result)
{
var ret = $.parseJSON(result);
$('#loading-gif').hide();
if ( ret.token )
$('#csrf-token').set( { value: ret.token } );
if ( ret.ret == '0' ) {
- $('#error-box').fill("OK");
+ $('#error-box').fill("OK");
var url = window.location.protocol + '//' + window.location.hostname;
window.location.replace( url );
} else {
- $('#error-box').fill("Password error");
+ $('#error-box').fill("Password error");
$('#decrypt-btn').show();
}
}
@@ -35,9 +35,9 @@ function decrypt()
{
// request
$.request('post', '../ncp-launcher.php', { action: 'launch',
- ref : 'nc-encrypt',
+ ref : 'nc-encrypt',
config: '{ "ACTIVE": "yes", "PASSWORD":"' + $('#encryption-pass').get('.value') + '" }',
- csrf_token: $('#csrf-token').get('.value') }
+ csrf_token: $('#csrf-token').get('.value') }
).then(decrypt_ok_cb).error(errorMsg);
}
@@ -51,7 +51,7 @@ $( '.pwd-btn' ).on('click', function(e)
input.set('.type', 'password');
});
-$(function()
+$(function()
{
$('#decrypt-btn').on('click', function(e)
{
diff --git a/ncp-web/decrypt/index.php b/ncp-web/decrypt/index.php
index 795b1287e..6ee624179 100644
--- a/ncp-web/decrypt/index.php
+++ b/ncp-web/decrypt/index.php
@@ -26,7 +26,7 @@
- Unlock NextCloudPi
+ Unlock NextcloudPi
@@ -49,7 +49,7 @@
NextCloudPi
+
NextcloudPi
Encrypted instance
@@ -80,7 +80,7 @@
// GPL licensed (see end of file) * Use at your own risk!
diff --git a/ncp-web/download_logs.php b/ncp-web/download_logs.php
index 15413445d..d3c0ffc6c 100644
--- a/ncp-web/download_logs.php
+++ b/ncp-web/download_logs.php
@@ -1,6 +1,6 @@
// GPL licensed (see end of file) * Use at your own risk!
diff --git a/ncp-web/elements.php b/ncp-web/elements.php
index 82f62cafc..71d15c344 100644
--- a/ncp-web/elements.php
+++ b/ncp-web/elements.php
@@ -1,6 +1,6 @@
// GPL licensed (see end of file) * Use at your own risk!
diff --git a/ncp-web/index.php b/ncp-web/index.php
index 17045474a..6f2001b6d 100644
--- a/ncp-web/index.php
+++ b/ncp-web/index.php
@@ -1,6 +1,6 @@
GPL licensed (see end of file) * Use at your own risk!
@@ -53,7 +53,7 @@
- NextCloudPi Panel
+ NextcloudPi Panel
@@ -102,7 +102,7 @@