Added occ script.

This commit is contained in:
Ze'ev Schurmann 2024-02-05 19:13:22 +02:00
parent 64bf0fe310
commit 4e10704a2c
1 changed files with 14 additions and 0 deletions

14
occ-from-anywhere/occ Normal file
View File

@ -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