Since you specifically mentioned testing the exit status of apt-get upgrade you would use 1 7 * * 1 apt-get update & apt-get upgrade & sudo -u www-data php /var/www/owncloud/occ maintenance:mode -off. su is traditional, sudo is the easiest, and super has advantages if you want users to be able to do parts of this. Su and friends to the rescue! su, sudo, and super can all be used here. How do I tell the system to bring owncloud out of maintenance mode after apt-get upgrade -y returns exit status 0? I thought about making the entry in root's crontab asġ 7 * * 1 apt-get update & apt-get upgrade & php /var/www/owncloud/occ maintenance:mode -offīut maintenance:mode -off fails as it isn't run by user Is there a way of doing this? Doing so prevents new logins, locks the sessions of logged-in users, and displays a status screen so that users know what is happening. So far, I've tried this: sudo -u www-data crontab -eĪdding the line 0 7 * * 1 php /var/www/owncloud/occ maintenance:mode -onĪdding line 1 7 * * 1 apt-get update & apt-get upgrade -yīut here I get stuck. Enable Maintenance Mode¶ Put your server in maintenance mode and disable Cron jobs. Use it to automatically sync and share files including some revisioning, it can sync between servers, and it can run some applications like calendar, address book, office applications too. Using the occ command we can control Owncloud in many ways. Owncloud (php) commands should be issued from user www-data, whereas apt-get should be run as root. OwnCloud/ Nextcloud server is a cloud server you can have at home, your company or organisation. I want to schedule it to put owncloud in to maintenance mode, apt-get update then apt-get upgrade, then take owncloud out of maintenance mode, once a week. My Raspberry Pi is running owncloud on headless Raspbian. Currently trying to understand scheduling. I'm following youtube videos and online courses, learning about Linux command, enhancing skills, trying to get good. see maintenance message (this shoudn't happen if there is no problem) set it to false in config seeing the update process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |