nextcloud-telegram-notify/occ-from-anywhere/occ

15 lines
279 B
Bash

#!/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