Compare commits

...

3 Commits

2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,5 @@
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.
Don't forget to set the two variables nextcloudpath and wwwuser

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