From cfcfe6d5ca6c37301f06fcf630344632c0f2e8b0 Mon Sep 17 00:00:00 2001
From: Mathias Wagner <germannewsmaker@gmail.com>
Date: Sat, 3 Jun 2023 19:58:20 +0200
Subject: [PATCH] Added ubuntu support to the nextcloud.js app

---
 server/handler/apps/nextcloud.js | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/server/handler/apps/nextcloud.js b/server/handler/apps/nextcloud.js
index 879e4ca..da7350e 100644
--- a/server/handler/apps/nextcloud.js
+++ b/server/handler/apps/nextcloud.js
@@ -10,10 +10,6 @@ module.exports = {
             description: "Zugriff prüfen",
             command: "if [ $EUID -ne 0 ]; then exit 1; fi"
         },
-        {
-            description: "Betriebssystem prüfen",
-            command: "if [ $(lsb_release -si) != \"Debian\" ]; then exit 1; fi"
-        },
         {
             description: "Installationsort prüfen",
             command: "if [ -d {folder} ]; then exit 1; fi"
@@ -24,13 +20,18 @@ module.exports = {
         },
         {
             description: "PHP installieren",
-            command: "apt install -y sudo lsb-release ca-certificates apt-transport-https software-properties-common gnupg2"
+            command: "apt install -y sudo lsb-release ca-certificates apt-transport-https software-properties-common gnupg2",
+            os: "debian"
         },
         {
-            command: "echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/sury-php.list"
+            description: "PHP installieren",
+            command: "add-apt-repository --yes ppa:ondrej/php",
+            os: "ubuntu"
         },
         {
-            command: "wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -"
+            description: "PHP installieren",
+            command: "echo \"deb https://packages.sury.org/php/ $(lsb_release -sc) main\" | tee /etc/apt/sources.list.d/sury-php.list && wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add -",
+            os: "debian"
         },
         {command: "apt update"},
         {