Want to change your background on a regular basis?

Hi All,
I’m certain that this isn’t news to anyone but thought I’d share the route I took to get a changing background for our ownCloud installation.

Having run the theme-bootstrap.sh script to create a new Theme, I loaded the core/img folder with 4 images as follows:

background.jpg
background.1
background.2
background.3

I created a script called rename.sh and ran sudo chmod +x rename.sh to ensure it was executable. The content of said script was very simple:

mv /var/www/html/apps/<theme>/core/img/background.jpg /var/www/html/apps/<theme>/core/img/background.4
mv /var/www/html/apps/<theme>/core/img/background.1 /var/www/html/apps/<theme>/core/img/background.jpg
mv /var/www/html/apps/<theme>/core/img/background.2 /var/www/html/apps/<theme>/core/img/background.1
mv /var/www/html/apps/<theme>/core/img/background.3 /var/www/html/apps/<theme>/core/img/background.2
mv /var/www/html/apps/<theme>/core/img/background.4 /var/www/html/apps/<theme>/core/img/background.3

I then updated my cron file for www-data (sudo crontab -u www-data -e) to include:

*/10 * * * * /var/www/rename.sh

Now every 10 minutes my background is changed and our users get various views of company sites.

Not very technical but thought some people might like an alternate background periodically.

5 Likes