No.
If a new php.ini
file comes, you get asked if you want to overwrite it, as with all config files under /etc/*
This is how it is normaly done:
Edit or create if not yet exists your ~/.bash_aliases and add this:
NC_DIR=</path/to/nextcloud>
HT_USER=<your webserver_user e.g. www-data or nginx>
occ() { sudo -u $HT_USER -E php -f "$NC_DIR/occ" "$@"; }
alias nextcloud-update='sudo -u $HT_USER php -d memory_limit=512M -d apc.enable_cli=1 -f $NC_DIR/updater/updater.phar'
# etc.
The reason why I put occ
in a function and not in an alias, is because this way the shell completion script works, with occ as an alias it doesn’t.
If you do not add apc.enable_cli=1
to your php.ini is absolutely ok, it is not needed to run occ scripts with apc.enable_cli
anyway. Only for some cron jobs. So you only need it in your crontab. But if you want to add it to all your php calls, then this would be the place to do that.
What do you mean? When there is a bug, you should file a bugreport.
Or do you mean, that you can not pass options to updater.phar
like --help
or --no-interaction
nextcloud-update --help
Usage: php [options] [-f] <file> [--] [args...]
etc.
That’s because, if you call updater.phar
with php, all further arguments passed will be interpreted as arguments of php.
The trick is to pass a double hyphen “--
” before you pass arguments for the updater.phar:
~# nextcloud-update -- --help
Description:
Updates the code of an Nextcloud instance
Usage:
update [options]
Options:
--no-backup Skip backup of current Nextcloud version
--no-upgrade Don't automatically run occ upgrade
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
This command fetches the latest code that is announced via the updater server and safely replaces the existing code with the new one.
Much luck,
ernolf