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 +