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

v6.23 #2784

Merged
merged 276 commits into from
May 12, 2019
Merged

v6.23 #2784

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
bb4a759
v6.23
MichaIng Apr 4, 2019
88d62aa
v6.23 (#2688)
MichaIng Apr 5, 2019
69a5762
v6.23
Apr 5, 2019
9b1c0c4
v6.23 (#2699)
MichaIng Apr 7, 2019
9cf6dd3
v6.23 (#2678)
MichaIng Apr 8, 2019
19e20b8
v6.23
MichaIng Apr 8, 2019
39b5fd1
v6.23 (#2702)
spectrumcomputing Apr 8, 2019
c45d05f
v6.23
MichaIng Apr 8, 2019
90e4e77
v6.23 (#2706)
MichaIng Apr 9, 2019
501e9d1
Odroid N2 HW codes.
Apr 9, 2019
09011ef
Merge pull request #2707 from MichaIng/OdroidN2
Fourdee Apr 9, 2019
d9ff690
DietPi-Banner MOTD
Apr 11, 2019
cc970a9
Merge pull request #2710 from MichaIng/MOTD
Fourdee Apr 11, 2019
5a0ffe9
Survey N2
Apr 11, 2019
ff63883
Fix for: https://github.com/MichaIng/DietPi/issues/2704
Apr 11, 2019
be6d020
Reboot required.
Apr 11, 2019
12a09ab
Minor
Apr 11, 2019
4357c64
DietPi-Benchmark run at nice -19.
Apr 13, 2019
9aba8b9
DietPi-Benchmark: increase accuracy of dd results with more time.
Apr 13, 2019
d232b71
1/4 of RAM for benchmark.
Apr 13, 2019
16d77f9
Remove hard limit to benchmark sizes. Rely on detected max.
Apr 14, 2019
2e0d4e7
v6.23 (#2698)
MichaIng Apr 14, 2019
302b8de
Up bench version, incase we need to reset current online results.
Apr 14, 2019
f19e332
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
Apr 14, 2019
8836119
v6.23 (#2700)
MichaIng Apr 14, 2019
b7492c7
v6.23 (#2716)
MichaIng Apr 15, 2019
f139ad1
v6.23 (#2705)
MichaIng Apr 16, 2019
91e3949
List available software ID's.
Apr 16, 2019
697e332
LXQt + GIMP
Apr 16, 2019
58e1b71
LXQT WIP
Apr 16, 2019
2d88a81
VNC detect LXQT install.
Apr 16, 2019
5615dad
Required.
Apr 16, 2019
8ddd312
+ XFCE4 power mgr. For LXDE/LXQt offers brightness hotkey support.
Apr 16, 2019
f41b771
LXQt profiles, WIP.
Apr 16, 2019
7a1ade4
Correction.
Apr 16, 2019
3c5d094
DietPi-NordVPN: Autostart/connect during boot option.
Apr 16, 2019
7fb84d6
Tweak
Apr 16, 2019
249e726
Minor
Apr 16, 2019
eff72f9
v6.23
MichaIng Apr 16, 2019
d793545
v6.23
MichaIng Apr 17, 2019
6414af0
v6.23
MichaIng Apr 17, 2019
56e7e51
v6.23
MichaIng Apr 17, 2019
ffbb919
v6.23
MichaIng Apr 17, 2019
ef6d3e8
v6.23
MichaIng Apr 17, 2019
eae4a9e
v6.23
MichaIng Apr 17, 2019
0ae1f9e
v6.23
MichaIng Apr 17, 2019
f29e065
Required for autostart toggle.
Apr 17, 2019
48dbcb9
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
Apr 17, 2019
bf928db
Not required, checks during init.
Apr 17, 2019
6168147
Whoopsie, got confused ;)
Apr 17, 2019
bfbb266
Whoopsie!
Apr 17, 2019
97279dd
Minor
Apr 17, 2019
dc7b98b
WAN IP + tweaks
Apr 17, 2019
b1b40ef
v6.23 (#2718)
MichaIng Apr 17, 2019
0ba9eb2
v6.23 (#2720)
MichaIng Apr 18, 2019
78224a6
Fix LXQT under VNC.
Apr 18, 2019
2325c39
LXQt: Install a basic notepad GUI (leafpad) by default.
Apr 18, 2019
46e11ee
Minor, LXQt, fit DietPi wallpaper to screen res.
Apr 18, 2019
4cf9764
v6.23
MichaIng Apr 18, 2019
14686f6
v6.23
MichaIng Apr 18, 2019
ccb4f50
v6.23
MichaIng Apr 18, 2019
e05a496
v6.23 (#2722)
MichaIng Apr 18, 2019
ca62698
v6.23
MichaIng Apr 19, 2019
eccef67
v6.23
MichaIng Apr 19, 2019
e9f9819
v6.23
MichaIng Apr 19, 2019
e3422e6
v6.23
MichaIng Apr 19, 2019
c6fca3b
v6.23
MichaIng Apr 19, 2019
451ace1
v6.23
MichaIng Apr 19, 2019
7261f07
v6.23 (#2723)
MichaIng Apr 19, 2019
458d8a0
META | DietPi-Survey_report | Benchmark rework and RAM reset (#2715)
MichaIng Apr 20, 2019
b604494
https://github.com/MichaIng/DietPi/issues/2715
Apr 20, 2019
5d37b03
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
Apr 20, 2019
aee4e8f
Minor desc/info.
Apr 20, 2019
1b5f97f
v6.23
MichaIng Apr 20, 2019
fdd016f
v6.23 (#2727)
MichaIng Apr 21, 2019
847a016
v6.23
MichaIng Apr 21, 2019
fddbd42
v6.23
MichaIng Apr 21, 2019
3a13392
https://github.com/MichaIng/DietPi/issues/2717
Apr 22, 2019
da67c2c
https://github.com/MichaIng/DietPi/issues/2717
Apr 22, 2019
27808a0
Minor
Apr 22, 2019
b1b18df
Revert 5 seconds and 3: https://github.com/MichaIng/DietPi/issues/2717
Apr 22, 2019
89d1d9d
Minor info.
Apr 22, 2019
908c64a
v6.23
MichaIng Apr 22, 2019
645c9d3
v6.23
MichaIng Apr 22, 2019
d299e3d
v6.23
MichaIng Apr 22, 2019
ac9b160
v6.23
MichaIng Apr 22, 2019
36ecc78
v6.23 (#2728)
MichaIng Apr 22, 2019
184fc76
v6.23 (#2729)
MichaIng Apr 22, 2019
fa1f046
v6.23
MichaIng Apr 23, 2019
330d731
v6.23
MichaIng Apr 23, 2019
54faaaa
Fix not starting services on boot. Always control services.
Apr 23, 2019
cd4de24
v6.23
MichaIng Apr 24, 2019
b5441ed
+ CustomFS benchmark scores.
Apr 24, 2019
c045c23
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
Apr 24, 2019
5f203a0
Minor
Apr 24, 2019
ab83802
+ info URL links.
Apr 24, 2019
d745b62
DietPi-Config: Intel CPU boost option.
Apr 24, 2019
43e0653
v6.23
MichaIng Apr 24, 2019
ec9048d
v6.23
MichaIng Apr 24, 2019
91d4a51
v6.23
MichaIng Apr 24, 2019
b2bbd24
v6.23
MichaIng Apr 24, 2019
b4312c0
v6.23
MichaIng Apr 24, 2019
cd6836d
pidof X never worked for me, switch to pgrep Xorg which does.
Apr 25, 2019
7985c0a
Move to /usr/games (same as APT). Support x86_64. Various tweaks.
Apr 25, 2019
45b8d74
Revert, x86_64 needs alot more work.
Apr 25, 2019
12f8c82
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
Apr 25, 2019
ce1f366
v6.23
MichaIng Apr 26, 2019
cf708de
v6.23
MichaIng Apr 26, 2019
54de30b
v6.23 (#2735)
MichaIng Apr 26, 2019
50d2a1c
v6.23
MichaIng Apr 26, 2019
f4f9936
v6.23
MichaIng Apr 26, 2019
77e45e3
v6.23 (#2740)
MichaIng Apr 26, 2019
a2a8e60
v6.23
MichaIng Apr 26, 2019
b11e023
v6.23
MichaIng Apr 27, 2019
fb1688b
v6.23 (#2741)
MichaIng Apr 27, 2019
81ef1ac
v6.23
MichaIng Apr 27, 2019
458255a
v6.23
MichaIng Apr 27, 2019
5abf309
v6.23
MichaIng Apr 27, 2019
24a47dc
Start of hidden passwords.
Apr 28, 2019
52d5106
v6.23
MichaIng Apr 28, 2019
98b0f39
v6.23
MichaIng Apr 28, 2019
25adccf
General | Move Jessie systems to "jessie-support" branch (#2742)
MichaIng Apr 28, 2019
c44b345
v6.23
MichaIng Apr 28, 2019
1d4fccc
v6.23
MichaIng Apr 28, 2019
d0d388e
v6.23
MichaIng Apr 28, 2019
ef179ff
v6.23
MichaIng Apr 28, 2019
781f9cb
v6.23
MichaIng Apr 28, 2019
a62550a
v6.23
MichaIng Apr 29, 2019
f4d7ac6
v6.23
MichaIng Apr 29, 2019
702c93a
Merge branch 'jessie-support' into dev
MichaIng Apr 29, 2019
d0316f6
v6.23
MichaIng Apr 29, 2019
d527cae
v6.23
MichaIng Apr 29, 2019
5a49812
v6.23
MichaIng Apr 29, 2019
4e62739
v6.23
MichaIng Apr 29, 2019
84caa06
v6.23
MichaIng Apr 29, 2019
b0b85ff
v6.23
MichaIng Apr 29, 2019
08d2511
v6.23
MichaIng Apr 29, 2019
cd6ccd3
Allow Jessie PREP
Fourdee Apr 30, 2019
8fff7ab
Apply process tool if services starting.
Apr 30, 2019
6bdb85b
+ branch selection
Fourdee Apr 30, 2019
ae5cbf3
syntax
Apr 30, 2019
8bc33bd
v6.23
MichaIng Apr 30, 2019
74b82f3
v6.23
MichaIng Apr 30, 2019
f99e1be
v6.23
MichaIng Apr 30, 2019
a6a4b62
v6.23
MichaIng Apr 30, 2019
5245a6c
v6.23
MichaIng Apr 30, 2019
26cffb7
v6.23
MichaIng Apr 30, 2019
57c629b
v6.23
MichaIng Apr 30, 2019
0406b12
v6.23
MichaIng Apr 30, 2019
a83c58d
v6.23 (#2744)
MichaIng Apr 30, 2019
5e9e68a
v6.23
MichaIng Apr 30, 2019
f589b4f
v6.23
MichaIng May 1, 2019
e031195
Workaround for C1 Jessie serial kernel dump
Fourdee May 1, 2019
946cb11
v6.23 (#2753)
MichaIng May 1, 2019
173b2d4
v6.23
MichaIng May 1, 2019
de44648
WIP: C1 Stretch Move image to ARMbian EOS.
May 2, 2019
a48ac80
No need to show this info if unchanged by user.
May 2, 2019
9522745
C1: https://github.com/MichaIng/DietPi/issues/2561
May 2, 2019
dc09158
v6.23
MichaIng May 2, 2019
dca651c
v6.23
MichaIng May 2, 2019
07ee4c4
v6.23
MichaIng May 2, 2019
7480345
v6.23
MichaIng May 2, 2019
a61bc21
META | Slight change of bug report entry to avoid users trying to exe…
MichaIng May 4, 2019
b17e4a2
v6.23
MichaIng May 4, 2019
620b911
v6.23
MichaIng May 4, 2019
3a65f6d
https://github.com/MichaIng/DietPi/issues/1918#issuecomment-489319719
May 4, 2019
aa4a36f
v6.23
MichaIng May 4, 2019
1ef463b
v6.23
MichaIng May 4, 2019
3a10e44
v6.23
MichaIng May 4, 2019
757f8ef
v6.23
MichaIng May 4, 2019
a94efc5
v6.23
MichaIng May 4, 2019
b436807
v6.23
MichaIng May 4, 2019
bc6336f
v6.23
MichaIng May 4, 2019
9f65268
v6.23
MichaIng May 4, 2019
2a8e1dc
v6.23
MichaIng May 4, 2019
f2dddb8
v6.23 (#2756)
FredericGuilbault May 4, 2019
02e15dc
v6.23
MichaIng May 4, 2019
c23700e
v6.23
MichaIng May 4, 2019
81810d3
v6.23
MichaIng May 4, 2019
a83efc1
v6.23
MichaIng May 4, 2019
f51948b
Trivial text edit for better clarity
FredericGuilbault May 5, 2019
66b8ecc
Resolve Java on buster.
May 5, 2019
4895718
Minor
May 5, 2019
56d5f01
v6.23 (#2767)
MichaIng May 5, 2019
158d0e4
v6.23 (#2768)
MichaIng May 5, 2019
259073f
v6.23
MichaIng May 5, 2019
f50b948
v6.23
MichaIng May 5, 2019
d3f5171
v6.23
MichaIng May 5, 2019
45f79c6
v6.23
MichaIng May 6, 2019
3de8402
C1: Revert Jessie removal until v6.24 released. Add distro check also.
May 6, 2019
c3baf8d
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
May 6, 2019
ba10c16
https://github.com/MichaIng/DietPi/pull/2771#issuecomment-489606736
May 6, 2019
511d658
Merge branch 'jessie-support' into dev
Fourdee May 6, 2019
7997931
https://github.com/MichaIng/DietPi/issues/2751
May 6, 2019
33f6bca
v6.23
MichaIng May 6, 2019
528b1bb
v6.23
MichaIng May 6, 2019
645a008
v6.23 (#2770)
MichaIng May 6, 2019
be02006
v6.23
MichaIng May 6, 2019
2b87f01
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
May 7, 2019
d7d02d9
Info
May 7, 2019
b530fe5
pre-reqs required for ARMv8 (compile) install, and possibily others.
May 7, 2019
8538127
v6.23
MichaIng May 7, 2019
d5bcb82
v6.23
MichaIng May 7, 2019
df2177a
v6.23
MichaIng May 7, 2019
8c4949c
v6.23 (#2773)
MichaIng May 7, 2019
2e49bc5
v6.23
MichaIng May 7, 2019
a7a34d2
v6.23
MichaIng May 7, 2019
676447c
v6.23
MichaIng May 8, 2019
3cac9da
v6.23
MichaIng May 8, 2019
066a6b5
v6.23
MichaIng May 8, 2019
986791b
v6.23
MichaIng May 8, 2019
f3f801e
v6.23
MichaIng May 8, 2019
e93bd5b
v6.23
MichaIng May 8, 2019
1998c45
v6.23
MichaIng May 8, 2019
3d3c06e
v6.23 (#2779)
MichaIng May 10, 2019
239b6e8
v6.23
MichaIng May 10, 2019
bf59ab0
v6.23
MichaIng May 10, 2019
b6c85eb
v6.23
MichaIng May 10, 2019
25415ca
v6.23
MichaIng May 10, 2019
e20d784
v6.23
MichaIng May 11, 2019
5e2ef9f
v6.23 (#2774)
MichaIng May 11, 2019
a24a269
v6.23
MichaIng May 11, 2019
7b1b0ac
v6.23
MichaIng May 11, 2019
9f9bc2b
v6.23
MichaIng May 11, 2019
f6df698
v6.23
MichaIng May 11, 2019
ad38e88
v6.23
MichaIng May 11, 2019
ae701d8
v6.23
MichaIng May 12, 2019
672e539
v6.23
MichaIng May 12, 2019
472c46a
v6.23
MichaIng May 12, 2019
cb9206e
v6.23
MichaIng May 12, 2019
d2846fe
v6.23
MichaIng May 12, 2019
a99d3ec
v6.23
MichaIng May 12, 2019
d91bda1
v6.23
MichaIng May 12, 2019
e366792
v6.23
MichaIng May 12, 2019
feaab2e
v6.23
MichaIng May 12, 2019
7105e0c
v6.23
MichaIng May 12, 2019
f08d80e
v6.23
MichaIng May 12, 2019
a025fe0
v6.23
MichaIng May 12, 2019
974346e
v6.23
MichaIng May 12, 2019
d5d08e1
Run DietPi-Benchmark at highest IO priority.
May 12, 2019
4029dc7
Merge branch 'dev' of https://github.com/MichaIng/DietPi into dev
May 12, 2019
e3197c9
Minor
May 12, 2019
f06e2b1
Info
May 12, 2019
461673b
v6.23
MichaIng May 12, 2019
8798243
v6.23
MichaIng May 12, 2019
39b0bb2
v6.23
MichaIng May 12, 2019
eaf0c39
v6.23
MichaIng May 12, 2019
95eb4ba
v6.23
MichaIng May 12, 2019
c4bfe35
v6.23
MichaIng May 12, 2019
5d9133a
v6.23 (#2788)
MichaIng May 12, 2019
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
4 changes: 2 additions & 2 deletions .conf/desktop/apps/opentyrian.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Type=Application
Name=OpenTyrian
Comment=An arcade-style shoot 'em up
Icon=/usr/local/games/opentyrian/linux/icons/tyrian-48.png
Icon=/usr/games/opentyrian/linux/icons/tyrian-48.png
Categories=Game;ArcadeGame;
Exec=/usr/local/games/opentyrian/run
Exec=/usr/games/opentyrian/run
Terminal=false
Binary file added .conf/desktop/lxqt/lxqt-buster.7z
Binary file not shown.
Binary file added .conf/desktop/lxqt/lxqt-stretch.7z
Binary file not shown.
3 changes: 0 additions & 3 deletions .conf/dps_114/apache.nextcloud.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ Redirect permanent /ocs-provider /nextcloud/ocs-provider
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud

# Hard coding 128M OPCache size, only for /nextcloud, to suppress warning on nextcloud admin panel.
php_admin_value opcache.memory_consumption 128

</Directory>
5 changes: 1 addition & 4 deletions .conf/dps_114/lighttpd.nextcloud.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $HTTP["url"] =~ "^/nextcloud($|/)" {
# - Files
$HTTP["url"] =~ "^/nextcloud/(\.|autotest|occ|issue|indie|db_|console)" { url.access-deny = ("") }
# - Directory listing
dir-listing.active = "disable"
dir-listing.activate = "disable"
# - Cache control and security headers for static resources
$HTTP["url"] =~ "^/nextcloud/.*\.(css|js|woff2?|svg|gif)$" {
setenv.add-response-header += (
Expand All @@ -30,7 +30,4 @@ $HTTP["url"] =~ "^/nextcloud($|/)" {
)
}

# Solve OPcache settings warning on Nextcloud admin panel
setenv.add-environment += ( "PHP_ADMIN_VALUE" => "opcache.memory_consumption=128" )

}
2 changes: 0 additions & 2 deletions .conf/dps_114/nginx.nextcloud.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ location ^~ /nextcloud {
fastcgi_intercept_errors on;
# Disable on Jessie, because Jessie Nginx does not support this directive
#fastcgi_request_buffering off;
# Hard coding 128M OPCache size to suppress warning on Nextcloud admin panel.
fastcgi_param PHP_ADMIN_VALUE "opcache.memory_consumption=128";
}

location ~ ^\/nextcloud\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) {
Expand Down
4 changes: 1 addition & 3 deletions .conf/dps_121/roonbridge.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[Unit]
Description=Roon Bridge
Description=Roon Bridge (DietPi)
After=network.target sound.target

[Service]
Type=simple
User=root
Group=dietpi
Environment=ROON_DATAROOT=/mnt/dietpi_userdata/roon
Environment=ROON_ID_DIR=/mnt/dietpi_userdata/roon
Expand Down
3 changes: 1 addition & 2 deletions .conf/dps_36/squeezelite.service
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[Unit]
Description=squeezelite
Description=SqueezeLite (DietPi)

[Service]
Type=simple
ExecStart=/usr/bin/squeezelite -a 4096:1024:16:0 -C 5 -n 'DietPi-Squeezelite' -f /var/log/squeezelite.log

[Install]
Expand Down
2 changes: 1 addition & 1 deletion .conf/dps_47/lighttpd.owncloud.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $HTTP["url"] =~ "^/owncloud($|/)" {
# - Files
$HTTP["url"] =~ "^/owncloud/(\.|autotest|occ|issue|indie|db_|console)" { url.access-deny = ("") }
# - Directory listing
dir-listing.active = "disable"
dir-listing.activate = "disable"
# - Cache control and security headers for static resources
$HTTP["url"] =~ "^/owncloud/.+\.(css|js)" {
setenv.add-response-header += (
Expand Down
13 changes: 7 additions & 6 deletions .conf/dps_51/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/dash
#////////////////////////////////////
# DietPi OpenTyrian Run Script
#
Expand All @@ -12,15 +12,16 @@
# Usage:
# run
#////////////////////////////////////
FP_DIR='/usr/games/opentyrian'

#Xserver already running
if (($(pidof X) >= 0)); then
# Xserver already running
if pgrep Xorg &> /dev/null; then

/usr/local/games/opentyrian/opentyrian -t /usr/local/games/opentyrian/data
$FP_DIR/opentyrian -t $FP_DIR/data

#No X (init X server)
# No X (init X server)
else

xinit /usr/local/games/opentyrian/opentyrian -t /usr/local/games/opentyrian/data
xinit $FP_DIR/opentyrian -t $FP_DIR/data

fi
4 changes: 2 additions & 2 deletions .conf/dps_85/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ http {

# Upstream to abstract back-end connection(s) for PHP
upstream php {
server unix:/run/php/php7.0-fpm.sock;
server unix:/run/php/php7.3-fpm.sock;
}

# Set the mime-types via the mime.types external file
Expand All @@ -42,7 +42,7 @@ http {
# Click tracking!
access_log off;

# Hide nginx version
# Hide Nginx version
server_tokens off;

# ~2 seconds is often enough for HTML/CSS, but connections in
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ about: Create a report to help us improve
- Software title | (EG: Nextcloud)
- Was the software title installed freshly or updated/migrated?
- Can this issue be replicated on a fresh installation of DietPi?
- `dietpi-bugreport` ID | `sed -n 5p /DietPi/dietpi/.hw_model`
<!-- If you sent a "dietpi-bugreport", please paste the ID here -->
- Bug report ID | `sed -n 5p /DietPi/dietpi/.hw_model`

#### Steps to reproduce
<!-- Explain how to reproduce the issue -->
Expand Down
25 changes: 15 additions & 10 deletions .meta/dietpi-cloud-migration
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash

(( $UID )) && echo -e '[\e[31mFAILED\e[0m] Root privileges required. Please run the script with "sudo".\n' && exit 1
(( $UID )) && echo -e '[\e[31mFAILED\e[0m] Root privileges required. Please run the script with "sudo".' && exit 1
echo -e '[\e[32m OK \e[0m] Root privileges verified.'

! apt-get install -y rsync && echo -e '[\e[31mFAILED\e[0m] "rsync" install failed. Please check your internet connection, proper apt-get function or try to install it manually: "apt-get install -y rsync"\n' && exit 1
! apt-get install -y rsync && echo -e '[\e[31mFAILED\e[0m] "rsync" install failed. Please check your internet connection, proper apt-get function or try to install it manually: "apt install rsync"' && exit 1
echo -e '[\e[32m OK \e[0m] Successfully installed rsync.'

systemctl start mariadb &> /dev/null || systemctl start mysql &> /dev/null || { echo -e '[\e[31mFAILED\e[0m] Could not start MariaDB server. Aborting...'; exit 1; }
echo -e '[\e[32m OK \e[0m] Successfully started MariaDB.'

run_backup(){

fp_config="/var/www/$1/config/config.php"

echo '[ INFO ] Enabling maintenance mode...'
! sudo -u www-data php /var/www/$1/occ maintenance:mode --on && echo -e '[\e[31mFAILED\e[0m] Could not enable maintenance mode, please check running state of your instance and PHP functionality.\n' && exit 1
! sudo -u www-data php /var/www/$1/occ maintenance:mode --on && echo -e '[\e[31mFAILED\e[0m] Could not enable maintenance mode, please check running state of your instance and PHP functionality.' && exit 1

echo "[ INFO ] Scanning $fp_config for necessary information..."
local fp_datadir=$(grep -m1 "^[[:blank:]]*'datadirectory'" $fp_config | cut -d \' -f 4)
Expand All @@ -26,19 +29,19 @@ run_backup(){
- database password: $dbpass"

echo '[ INFO ] Backup database to data directory...'
! mysqldump -u"$dbuser" -h"$dbhost" -p"$dbpass" "$dbname" > "$fp_datadir"/dietpi-$1-database-backup.sql && echo -e '[\e[31mFAILED\e[0m] Database backup failed, please check state of your database server, check logs and in case repair table corruptions.\n' && exit 1
! mysqldump -u"$dbuser" -h"$dbhost" -p"$dbpass" "$dbname" > "$fp_datadir"/dietpi-$1-database-backup.sql && echo -e '[\e[31mFAILED\e[0m] Database backup failed, please check state of your database server, check logs and in case repair table corruptions.' && exit 1
echo -e "[\e[32m OK \e[0m] Successfully finished database backup to: $fp_datadir/dietpi-$1-database-backup.sql"

echo '[ INFO ] Backup installation folder to data directory...'
! rsync -aHp --delete /var/www/$1/ "$fp_datadir"/dietpi-$1-installation-backup && echo -e '[\e[31mFAILED\e[0m] "rsync" failed, please check for error reasons and try again.\n' && exit 1
! rsync -aHp --delete /var/www/$1/ "$fp_datadir"/dietpi-$1-installation-backup && echo -e '[\e[31mFAILED\e[0m] "rsync" failed, please check for error reasons and try again.' && exit 1
echo -e "[\e[32m OK \e[0m] Successfully finished installation backup to: $fp_datadir/dietpi-$1-installation-backup/"

if [[ $2 ]]; then

echo '[ INFO ] You provided an additional backup location. Moving data directory...'
[[ ! -d $2 ]] && echo -e "[\e[31mFAILED\e[0m] $2 is no existing directory, please check spelling and mount status of your desired backup drive.\n" && exit 1
[[ ! -d $2 ]] && echo -e "[\e[31mFAILED\e[0m] $2 is no existing directory, please check spelling and mount status of your desired backup drive." && exit 1

! rsync -aHp --delete "$fp_datadir"/ "$2" && echo -e '[\e[31mFAILED\e[0m] "rsync" failed, please check for error reasons and try again.\n' && exit 1
! rsync -aHp --delete "$fp_datadir"/ "$2" && echo -e '[\e[31mFAILED\e[0m] "rsync" failed, please check for error reasons and try again.' && exit 1
echo -e "[\e[32m OK \e[0m] Successfully synced data directory to: $2"

else
Expand All @@ -53,18 +56,20 @@ run_backup(){

### MAIN ###

if [[ -f /var/www/owncloud/config/config.php ]]; then
if [[ -f '/var/www/owncloud/config/config.php' ]]; then

echo '[ INFO ] ownCloud installation found, preparing backup...'
run_backup owncloud "$1"

fi

if [[ -f /var/www/nextcloud/config/config.php ]]; then
if [[ -f '/var/www/nextcloud/config/config.php' ]]; then

echo '[ INFO ] Nextcloud installation found, preparing backup...'
run_backup nextcloud "$1"

fi

[[ ! $fp_config ]] && echo -e '[\e[31mFAILED\e[0m] No ownCloud or Nextcloud instance found at /var/www/owncloud|nextcloud. Aborting...\n' && exit 1
[[ ! $fp_config ]] && echo -e '[\e[31mFAILED\e[0m] No ownCloud or Nextcloud instance found at /var/www/owncloud|nextcloud. Aborting...' && exit 1

exit 0
Loading