From 4e10704a2ce45c7bd81517792ed0642d264c6094 Mon Sep 17 00:00:00 2001 From: Ze'ev Schurmann Date: Mon, 5 Feb 2024 19:13:22 +0200 Subject: [PATCH] Added occ script. --- occ-from-anywhere/occ | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 occ-from-anywhere/occ diff --git a/occ-from-anywhere/occ b/occ-from-anywhere/occ new file mode 100644 index 0000000..6d1e8c5 --- /dev/null +++ b/occ-from-anywhere/occ @@ -0,0 +1,14 @@ +#!/bin/bash + +## Make this file executable and save it as /usr/bin/occ +## Now whenever you want to use the CLI tool occ, you can +## do it from anywhere. + +nextcloudpath="/var/www/html" +wwwuser="www-data" + + +sudo -u $wwwuser php "$nextcloudpath/occ" $@ +errorcode=$? +exit $errorcode +