how update moodle code example
Example: moodle update cli
cd /var/www/sites/moodle/htdocs/
php /srv/moodle/admin/cli/maintenance.php --enable
git pull
php /srv/moodle/admin/cli/upgrade.php
php /srv/moodle/admin/cli/maintenance.php --disable
cd /var/www/sites/moodle/htdocs/
php /srv/moodle/admin/cli/maintenance.php --enable
git pull
php /srv/moodle/admin/cli/upgrade.php
php /srv/moodle/admin/cli/maintenance.php --disable