Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added update script, better install, support for resize
- Loading branch information
Showing
5 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Updates the graphs, html and resizes the images | ||
# | ||
|
||
/usr/share/munin/munin-graph --config=/etc/munin/munin-mobile.conf | ||
/usr/share/munin/munin-html --config=/etc/munin/munin-mobile.conf | ||
|
||
# Find images in mobile dir, files, *.png, modified between 0 and 3 minutes, not including images, resize with mogrify | ||
find /var/www/munin/mobile/ -type f -name "*.png" -mmin +0 -mmin -3 -not -wholename "*images/*" -exec mogrify -resize 300 "{}" \; | ||
|
||
# Old, obsolete labour intensive resize | ||
|
||
exit | ||
cd /var/www/munin/mobile | ||
|
||
for file in `dir -d *` ; do | ||
if [ -d "/var/www/munin/mobile/$file" ] | ||
then | ||
if [ $file != "images" ] # Dont resize our template images, we probably should check css/js here as well... | ||
then | ||
/usr/bin/mogrify -resize 300 /var/www/munin/mobile/$file/*.png | ||
fi | ||
fi | ||
done |