diff options
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/rpi-monitor/Manifest | 19 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/about.html-2.10.patch | 35 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/cpu.conf-2.10.patch | 82 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/daemon.conf-2.10.patch | 95 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/gentoo.conf-2.10.patch | 560 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/memory.conf-2.10.patch | 116 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/network.conf-2.10.patch | 58 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/rpimonitor.confd | 4 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/rpimonitor.initd | 2 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/rpimonitord-2.10.patch | 15 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/sdcard.conf-2.10.patch | 89 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/swap.conf-2.10.patch | 52 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/temperature.conf-2.10.patch | 33 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/uptime.conf-2.10.patch | 26 | ||||
-rw-r--r-- | www-apps/rpi-monitor/files/version.conf-2.10.patch | 78 | ||||
-rw-r--r-- | www-apps/rpi-monitor/rpi-monitor-2.10.ebuild | 185 |
16 files changed, 1444 insertions, 5 deletions
diff --git a/www-apps/rpi-monitor/Manifest b/www-apps/rpi-monitor/Manifest index b7215238..aa70496a 100644 --- a/www-apps/rpi-monitor/Manifest +++ b/www-apps/rpi-monitor/Manifest @@ -1,19 +1,34 @@ +AUX about.html-2.10.patch 2059 SHA256 4c53490a5a6a0af0679fccc69f3997d1fd769c85141f26cb774955f3a68b62be SHA512 aaa2d122264ada4ce905e329e3bdaf841c6b3c682032d2ae4bb56b5c8630d81f045225cb05aebf91896d88147ddb407744de743e83e05856e901d546f77c12ae WHIRLPOOL 8c8ae46c993e2aeaa9dfd130af4119ee8e3eede83b84c78048b8f1b979749bcc7e564797ce6b00121238bb6ec633b53c4732dec11d06a8561a190ac23736f69c +AUX cpu.conf-2.10.patch 3958 SHA256 43406264cb593e29918ddecc5ca4f7040839f20722e7f4e3c901fe7642da1e6f SHA512 1be286a572a1946f81ebd78f18bf06ca05159e9bc388d888a5d82240b2d77bf27e2635f27e4fd751086e21e04dc4c2b57baae586303eafda1c9fa3ab1caa7cd9 WHIRLPOOL 46400468f7a13743bf702e72b749fe3280dffbee89ed6fad40ee08e1ea5f63ceb10383d41eb94c6ed413b2f5d17b2a8ee83113b00aac2fc1fcc346b5e4bf4381 +AUX daemon.conf-2.10.patch 3042 SHA256 aac760e471ed564cd1b99b3ebca27584842870ca320c17800cbd8918f8f895f0 SHA512 4bb92759a53d231637acadcd32adba8a4cbef63fe78a7037bc755995d96d75a5449a6a489f82964dde86a8b25f58635eccc891b8c40abdc9285b2f26ac65f25c WHIRLPOOL f9c0968040ddc3238852f6456c31625122fbbff7a66e699beb4264728fc7e0ad8eb13e868402f87f4c2da4cca033ae28e6c3ae849a872f4f6696bbfe590cb79d AUX default.conf-2.2.patch 24352 SHA256 f4eb0086d55cdda1889073bd8894f7bf203d997d15eff4170e1ff22b23f71094 SHA512 1ea81937d8c6a2b39aab951f4cb4fd3c0a6c9d63d2147ff0aff249a543efb3f574841c8d320fe88d463cdec8c1424f9abf3b8ceb018135d9d5d034c29e682f20 WHIRLPOOL b356e732c26eed507b06fa80d333d83425a93d51a20ad935f7fbcf9de2124010d4e2ddbee37da21ddfd4d9990335aa54db6e65d9825e7ac769bb4118824df849 AUX default.conf-2.3.patch 24271 SHA256 a6a890f808e57815fee2c2c513c8c423697d9744a56bad4a530994872ccf4ea8 SHA512 cdeef3311411c5110ea4c12c33253104f7edde4a9405212c4236dcb3cd61304ce5fded8ddb534be33f5559172c1af3236138b2d36a6128b98b53a6a5354affcc WHIRLPOOL 4763fd2d5d6620a30993852615f22a6b4dcae10967e681ba661fa3f5a6e41e6721f21b0497441058a65cd0b9f4f01c0e8b2a04560f637e9644dbe3bc37026544 AUX default.conf-2.5.patch 26715 SHA256 3ae3bab4bd0162756dcbbd1b614043a519dae6e57f9528f95ac2093081c2b6aa SHA512 d8079ebe919101d7b9bd2814eae8bdaadfcbaf19cf89400871775f6cb25be7853089ce02d60c8c2bcee6ee8d20ebce2ed4c57bc6ae23b2c45a440803a0545d30 WHIRLPOOL b33b4ba6e00d0ae4fbbc09904aeb1922a015ffd4914e8aa9357899f73f30b884b1012bff039b23e126e639ef0867777e9ddf5aa4eac8f49573fce952a6f54353 AUX default.conf-2.6.patch 29257 SHA256 072d5226d19a97db01f987c548465a8f868f474959c8485420fd2ee81d63f92c SHA512 f6ec19d81cef1722d7ae1f51a7a5dd98d0a60c90a9709b0d77411f74f4e39d0d1bbf9ec37d428c09256db07bddf31abad514584162e98563276c469be3e79661 WHIRLPOOL b7e8a1683fa566cd0610dca3b24a2b194482ef776b39bf6a241b23f2dea1fb030d20f35e89af3ef6ecc396db3742c6123016fb120d92eaef063c95e9e7743129 -AUX rpimonitor.confd 112 SHA256 b683366153e78b3f2e3040036315ed4bb6e97f6963dde609b3099551dc84795a SHA512 46c2f4340023f8b7957f604f1baa661eb4a97f54a2f6a03abf25525d9c7db78135dc556866cea416080398e6af84c7ac6c935e4230154f5164cb1535607e3395 WHIRLPOOL 869fc2d100e725d3f171d509b6bd997b9f9ada00600c237b30f8e6951cd7dc4fe4be2d72e343dba9caaab1b61c741cd3422cf137dd94bd7571be0c837d447ece -AUX rpimonitor.initd 973 SHA256 d9ae46e6fa0eaef295736fc9bfc9b4c8af000d67bf4b102375c3ba21610e8653 SHA512 e9bab0b0f1fe8cb6425fa3ddef157df28ef3be344927dbff9d216cb57e31c57a7b79181999fa067e69c62364f5eb1a665d21efdbfd82fdf7dc8b1d54c9efbd1d WHIRLPOOL 3714306bc6b33150dd0ecb3128d044099ecaa92ac4c77b33f1289060bd6112671c8ea764715e3aabfbfd9ee962d6beecc20b180bc2b2583856467e75d0f86a2b +AUX gentoo.conf-2.10.patch 25733 SHA256 c9e676d92f45fa74c17935ddd48ae3aaf93b43ea48316611d25f558c25e8ad98 SHA512 04f42614e4f7ca9121cc23e4768dff4694709a7322fd918fe809e75d284fa2e1ee11d1f363f45e2b132ec843f670a38f458a694a009c3cec568306ad742bd3cf WHIRLPOOL c0c9dac6dd9db1481c5fc4baca5bf5947deaa820dd1d92c2279b1d002a4180997c352d4363ac82ed37e829ba45a3a0a59a499e708a31d47cc085cd140cd5fd2c +AUX memory.conf-2.10.patch 6038 SHA256 43401a9505bbb57ce73fde7fd40fc3130f009262813cad60c4f6daaab1623a9b SHA512 6a64abdb4c0762ade0b601acc7c2913afc0889c4575dbfac71f638bab3f103002b99869a8f766005070ac6374565b3c5bf9da0cf0fd7bc6fba1c661411a45be8 WHIRLPOOL 4e5e146b4fe01e4a4167c93776dd01839ca1b59c7f0d2bedd7e2156212afb2d2ce6526f6cb3b2695fefc8fb0857d176f8a9398d0bae3e90b3f6e99ecead8c18b +AUX network.conf-2.10.patch 3269 SHA256 9fe65c3e87bd8e070552a57b8635488880ee39fd848f23176ff102c2aa6171cc SHA512 cd1b16f7b82fb442c3ba026be07cccea658f3652b872b4fcf8c08451bc5c8e31ee1bc688ffb4ec265a0d127a25fca5b686ac4649ae83a7fd1fd44c3c675c5270 WHIRLPOOL 92c68dbc929427c0198f6ead6a23c8ea2994cf3aa80ec1ef14f29b59e08f739e86accfdcc2f5d9e2f07657c6550772e840c39fb9cf440cc8bcf3c9edf0513e8d +AUX rpimonitor.confd 110 SHA256 2aec673afcf21a82b9bcfd7f686ae418d7f8246d1cf376fa7341d589ddf9021e SHA512 32fd23d631abdb71e1e827be67b4a7777a7292763c1024bd3ee34a231ad8b3d612aba8c6e17478058c764cdf2311ea141d3424e88f88f522b1931e2d800b4037 WHIRLPOOL 055f8d240ec41fbd354e815dd1136f089d0d1a50737de5ae368c0ddc6d7dd67c4415d0be8fb610a6c8963d0fd94044eb95f424ba77170e4c9fbd7e63a1abdd0f +AUX rpimonitor.initd 1000 SHA256 953133c57d684db0c05ab80c8d7ca688e850fc056dc88db5d55c34c46055039d SHA512 069c4cacf047626e008ee284861fd4473176c65ebed3bf91959a6e6a57115a4f7f371dcae52e6fb0adbd18fcea6aa74ddaae37ea8e4d4d7067137c7ea725fe87 WHIRLPOOL 335e27d0e13b5c99a4b7a89804e5b7440726b1babfacd66e6fd1ec7e876e38c222893557e779a15d3605e25407ae1020cf85df05dea0ecb67815b8da5500f3f5 +AUX rpimonitord-2.10.patch 729 SHA256 cc9edc717d59711fdfb695a881db7e349efc138c04e2c4275adad15a393170db SHA512 e335c8424427f060a7d6f97782805329934d02db0869d58c30b23975e098358ef15bdd632274278149ed64ddb01e8070142da1815bcf11841954179420fa0ae5 WHIRLPOOL 5664539a3a23621685612d2c0569fe47cda032215bb04f5549b5f4cfa48ef59109c72f8b6219fe53c2133ada6a0f5a37ef62d460ab88cc39cfda1be0744c63aa +AUX sdcard.conf-2.10.patch 5079 SHA256 d95b9b2bc402ca25257a7fdee0098c447edf98b5f1d0531d6ab7af596e10c48d SHA512 cf6cb263ce4358805b3afbd7472aeb0ac6dc7bf4933265d990a95347271f060073d54948134026e3e8d68ad69cb7b4148c77257ad45b2d24cef8b1aa3b2f919e WHIRLPOOL 4d4460e4d1aaf5c3482dd32147347994e63901b0efdf02138fae02da3f8fcf47501b25fb3682e1b247f0e8d6c77be425e6c5d76ffe96882206f159ab7c85c966 +AUX swap.conf-2.10.patch 2681 SHA256 12ea6093dc2ccde4aa10840691d791a6a9dbe35047056f5945216b8b360f87ed SHA512 bdc048c68d31e7bed4e2a29821718a7e949e3bd05c88f19f74c57d6a4ebc9e0fd30307153b266e9803a81d3f4344af034ea046c46d6a38ead079730832c85834 WHIRLPOOL 0cd0ece2cc1d5c48f0769c48f44a59bd386ca602803142cc6fef3f92e75e3aca33abfd4a7e690acb5bcb87703bb6e91040d32b79e9b6a25878ac99b6272a71a0 +AUX temperature.conf-2.10.patch 1727 SHA256 834eaf81a89bb78fa7ebfbe8aad4083c8c68502857a548904e35b51f6a139ce7 SHA512 313339c1994da7e82f61d436d5d81a5b912b6b098486b2c5b65eda646d541099e7dc9b2793dbfac4c5af08571888a9495233b95650b41e84674480a7b1ed6183 WHIRLPOOL 82294a18002efabf1bfdf8410fe3994df0445fdcb49d74be406fb03cc41647711caf2127284c3d528489436f80fd09dfbaeaa3327fb408b25516421dce516dc2 +AUX uptime.conf-2.10.patch 1546 SHA256 3514386cf868d3faaa46e81d94f93eac99e95b764ea4061d887289fac741a059 SHA512 bc3cf9d48e9e1827935363545be132da0ddda954841b0e22fffff76070410a4a714fa6563eb7275312adc4e256438c31726f14c6e08fea0a7a1d26f047f85a4a WHIRLPOOL 161cefface5249f1982659b15a2c332ced66cd7b9825a88c31c44407e40720824ecabfceaceed1270c4faf019f4259fb43f085d3589bcd5f9ecc38bf4bee1f84 +AUX version.conf-2.10.patch 2971 SHA256 ce4eae5a876faad178c0574de69aaa305473fc2acade7b65f60e9fbf707c919f SHA512 89f8891baa64410698deec9318d197a1846ecf62923159e5fbeee169ed0ccd056aa7b1efd31d6ca0729dba4972789ba31bd3ab042cfa0ae9a214a8cebbdd6b2d WHIRLPOOL 8c54a074c5fdb7db5b46a297056ce58781216ec94332913c26d4782deb80bc0091316b3967c5c2ab255fbd67ddc2e9840fb534955eee42c88b15926adb174604 +DIST rpi-monitor-2.10.zip 560159 SHA256 e2c8f56ab22c79382fce063dbfc0c0cf3b9e9dcd60017c2b9a60a55275016c93 SHA512 598d82b8ec5d889b7efbaff038c7e049d4c93486412f0724c144821d8c1b7f4a380736722918419bb7861745e4fddb57e210dff83a08928338a08472c2851729 WHIRLPOOL 14548d0ffe3a603cf29be0f0866ce7e97cfda6a285c831f0e3f1958e0176eb86334ae8d1cc506e18a1304b068438f19dcb588e56bd033625282a65d7a8c94667 DIST rpi-monitor-2.2.zip 292550 SHA256 e37f4be434c47a48c22e4db649e7960c9ab2e6c8851187a2628b71225121f25e SHA512 731a229097e7472e357af2b52ebebfeae65f73f91a44b3bb7c09c7ce72ddb55e2cdb1b03a9147094c359330a0e12e1b5ad9c754f2a3ce70e5a7287980643f4cc WHIRLPOOL 153e6e9a33c71255a787fceeb74d6f0c1ca15079682296f4971882781c62bc241a323ce9f1d91fa49cc5d2b4f541ae94b2da844bdc27ba2809cba1ffa02c1e5d DIST rpi-monitor-2.3.zip 292742 SHA256 67b458800d13dae4a1ccc38c11f1164c3438526c61f57ee810e5b9957399307f SHA512 90bfde85aad88425db8ed53a78e1e049ffecbe778ffae2fbc66915fa7e242b11e61a6ae5c6eb2805b326df8a0023d1b1d666f6c1fa21e68b9256c4e13c209fbc WHIRLPOOL 3b31bbf7c30da8111e6b8030f39513524ffe98dd74c95cdd48634229c7c1eb040abf183f5160a408a107c58a088de22aa34cfe37ca5ebe3133db2575a5b6bb56 DIST rpi-monitor-2.5.1.zip 303264 SHA256 955b9ef9e684207231f7714e7dbb9a10cd60f3572a4c729070a47d51bbe060bd SHA512 7bef8053354a2b4bf986c69969bc210410bb0832b7961941134df850134c1c8933a8b1dc7ebd248c3966605e333967eea94901c33d80493c4859c64193d1406b WHIRLPOOL 09fbbf44648be382f4b2c75b482dc5cdaaaa2ffbf02cc4f5a41d1a9803fdf270191af381745d4d703ac2dd94276d457543099fd05d13bc320ba69239b12092ff DIST rpi-monitor-2.5.zip 302926 SHA256 1f8e2225576faab8e991342bbee7ee4ff4598fd7813a9a5d237c3528690f044d SHA512 f95c535ebf353bc4ec308f8bd620c2521aae544012833e2dd77dd82457e070b5b13e86008225acba700c9e1eca416d8182cf64b6ab964b28e200c195a82df28e WHIRLPOOL 2409475bb52c01f8f726fbe49cd6b4185ffd7fe4150c20500a651460798753c0e4936892049283e921ec54f2542cb3964726e08f467849630cc4d8ecf4452683 DIST rpi-monitor-2.6.zip 305103 SHA256 1a0b03978766e1d8e445b76831912f56defe928bf0a73394a28c3eb1a3e600d8 SHA512 2ac668254ec21f79ab83d0d884a9dd5d70dcb0aa8711b99b71aa134c4b6ee7dc50054f310dbd195e6dd491a4522a37d6b8739770e900f0e983da0d3ad06ccf7e WHIRLPOOL 97f20f8392c77521a48bea12399a7ab47726895519a86a67baa2c8285cb2fb4818c8ddedc96af35e5cb806b1488cce0d70d7e3b175f4eef3fa23635a463dd0b6 +DIST rpi-monitor-deb-2.10.zip 8127536 SHA256 cf36fa34a83cea599e859c97692f38e6bc11f62d1bd7cf8a502e6daf73009643 SHA512 f870960fdb683927a1bc05c61c35e1279096221cf3fc39db07dc71e9bcda989e8ab6fccc147dc2f39dc7a0a9a89a1627e5de1001e8f7d468976c7c5a08a8d9da WHIRLPOOL eb389097cd06cfa22481c5e6d71cfd1733f09d004ffd08325e2758c7ab0af9df209eccdfd691c4af5fe7d53106160d380b447a46b4e94c0a9e3044153095ce42 DIST rpi-monitor-deb-2.2.zip 2127268 SHA256 04bd659402cda83df2d34fb38efce4db710f1c63ec41e1905cca9d4d3b41f516 SHA512 ed51fec16b0c23fe73c9b733d4cf8f655089d13c408803970a834d1f5c3a71df026814dd2b6d2ea0759e533e154185beca70eb7048468566cef55fb4ac7b6c2f WHIRLPOOL 006bb1f20f1d6e54e73e1f7f8b6eeb85e75219190450dcd16d2104f555f75dc5751034b1f62af7923137da260f730390c2d668860825cd61d4d6548a23f0e1b3 DIST rpi-monitor-deb-2.3.zip 2393064 SHA256 63c0c6cb822c55b693a1741cdca26a316df8508049c741b0b6e8268c655b705d SHA512 88125b79ce6a0e4466c469e8e344a74eddd2aecb9c046c08251da99c90192f9174bfcb722df5ea79a979da44193b76a6b434f5a9af1d8fe2a02e5c38e0e335b8 WHIRLPOOL bb2d05510cf5577762b14dc95537ae359df979327824943d6710b2038c9982cbd67a1f712acec1f6586de9efa36a51dea841a836de4a84d2a6d03304c92dd708 DIST rpi-monitor-deb-2.5.1.zip 3212356 SHA256 25fdf04f482e401a58762b4ea91e5a7ac248ce20b694ae914b58824667a65128 SHA512 0bec95b6d6ca2188506fc7c1a1b0cd327aec286e3a370659f628e67becdd7d4e5310dfee0e28ab9713350e8f3655dc9910630430658c8d8772891a4e5ca7d6e9 WHIRLPOOL f1299e525f8025d087071abad365b9d0d0ee7a8505ecc9606baf54739ea589aa14246e17ce2803fc58e09c0038fc3968f570ec1bd18372a22cae6983e9421769 DIST rpi-monitor-deb-2.5.zip 2940038 SHA256 8fea9b70de86ca6b1548e0960d31d86ebea8c22ba0aec9683a4ece5ec82cc215 SHA512 4d4dcabaae9533e01f7ae93ed2eaf28e9a86962b30f0ba9d785b8de62f9398e6bddc5619b34d3cd2f1abac7a293bacdb1e28ae0446b1c16dc31bda9891e52024 WHIRLPOOL 5a2c59350ce40a5b7982d425fc41df4901bcf06c457ea9e3e85d18b79739c491b831bfe33cc99fc868edaa2a28030faf82fc19cda40b4b214990bb94a4ec210d DIST rpi-monitor-deb-2.6.zip 3487502 SHA256 2b066e0524cd813aaa93d1f60d213662378c62778a2d0f90ad66046f802841e5 SHA512 e75bbd33aedfe35df81c1b9c1a03f8e9a5e74aa33a6c175c9842f1717b97596122c959cd621762f5ea08c25329c4327052e3f13e5cfb93b8b1d6ae4cbe14bec0 WHIRLPOOL 76a2a8519ba8e5d926a62164c40ad1949b59fd17dd4f38823e8cb5953cc6a7eda72a3e7c17e6de46bc7c4bf7ee46c6b989cd2310c304021e6c36ef52011788aa +EBUILD rpi-monitor-2.10.ebuild 6147 SHA256 67113deefc2b600a6d934346628537ca761c537fe7407666f270d72a339310d2 SHA512 8f6d6243834a249d89301cfdcc50c31ef6da0002375571e76b1b95006c5445850a93cf75ec3a1f38e28f2fe8c0012bff5aa5e523aab567d50bcd0faa304ddd24 WHIRLPOOL 645e08090c52303d3bb079a1feae74816b2f08f4890696c6d83c85f0788d771e8664df8a3eefaf48f3294a57e573191807a8f5e3550379d3bbd86cb74593f05b EBUILD rpi-monitor-2.2.ebuild 3466 SHA256 acb9997f49bb6662e7fef87d8c1f0f1ceb0ff6a608090a5be9e542475b891587 SHA512 333211f505096f667af8037b1a94aa80635eff5ac668002225ed32ba74cf1b6c3d79842b58b84605d3928f74bfad0ccee791396c48eb9bef1b039bfc7641b3cc WHIRLPOOL 866bb749de15a15ffd437f893306b0d3a722d3266e95357d2eba18ac4cd6c7fc036997faa7e594d860e5c210e43e47cd5b538fbd227caf34c35aecfe77b581b7 EBUILD rpi-monitor-2.3.ebuild 3466 SHA256 acb9997f49bb6662e7fef87d8c1f0f1ceb0ff6a608090a5be9e542475b891587 SHA512 333211f505096f667af8037b1a94aa80635eff5ac668002225ed32ba74cf1b6c3d79842b58b84605d3928f74bfad0ccee791396c48eb9bef1b039bfc7641b3cc WHIRLPOOL 866bb749de15a15ffd437f893306b0d3a722d3266e95357d2eba18ac4cd6c7fc036997faa7e594d860e5c210e43e47cd5b538fbd227caf34c35aecfe77b581b7 EBUILD rpi-monitor-2.5.1.ebuild 5027 SHA256 2af8e2478a45ef67f3cc52077512fb24ff9d65e597404fa93bbac0a28489e392 SHA512 2a1b1b97f6b7d76f67dbad4f64b9abb789a019cc6db004d8115be3b91ccfee5d268f46bb3ae7c1e34faabf674cbb1329fc1957cb51787cd2c6302f27d264624d WHIRLPOOL ba2f56158a056d223a216d4aeba0f56bff4ce1e1849bc031f3d77d27e2cedf0eb42e9e42d3e86ee8eccb3fd99fd3bb093297712c872e500d8619297b7d86f670 diff --git a/www-apps/rpi-monitor/files/about.html-2.10.patch b/www-apps/rpi-monitor/files/about.html-2.10.patch new file mode 100644 index 00000000..7dae584c --- /dev/null +++ b/www-apps/rpi-monitor/files/about.html-2.10.patch @@ -0,0 +1,35 @@ +--- rpimonitor/web/addons/about/about.html.dist 2015-03-14 19:20:02.249612000 +0000 ++++ rpimonitor/web/addons/about/about.html 2015-03-14 19:25:14.059612000 +0000 +@@ -10,23 +10,20 @@ + <h3 class="panel-title">About addons</h3> + </div> + <div class="panel-body"> +- <b>Addon</b> is design to let you add more functionnality to ++ <b>Addons</b> are designed to allow you to extend the functionnality of + <b>RPi-Monitor</b>.<br> + <br> +- The realease of <b>RPi-Monitor</b> provides the following addons:<br> ++ This release of <b>RPi-Monitor</b> includes the following addons:<br> + <ul> +- <li><b>about</b> - this addons</li> +- <li><b>custom</b> - custom addons using <code><iframe></code> to display external html page</li> +- <li><b>example</b> - expamle of addons showing how to develop and addons fully integrated to <b>RPi-Monitor</b></li> +- <li><b>shellinabox</b> - Allow ssh access to your computer through your browser</li> +- <li><b>top3</b> - Show the top 3 processes using cpu and rpimonitord cpu usage</li> ++ <li><b>about</b> - this addon</li> ++ <li><b>custom</b> - a template for custom addons allowing the use of <code><iframe></code>s to display external HTML content</li> ++ <li><b>example</b> - a sample addon demonstrating how to develop and fully integrate addons into <b>RPi-Monitor</b></li> ++ <li><b>shellinabox</b> - Allow ssh access to your Raspberry Pi through your browser</li> ++ <li><b>top3</b> - Show the three processes using the most CPU time and monitor rpimonitord CPU usage</li> + </ul> + <br> +- Addons are configured into <code>/etc/rpimonitor/data.conf</code>. You can customise +- <b>RPi-Monitor</b> configuration to add or remove addons.<br> +- <br> +- Refer to manage and/or comments in configuration file to see in detail how to use addons. ++ Addons are loaded and configured from <code>/etc/rpimonitor/data.conf</code>. ++ See the comments in this file for details of how to use Addons. + </div> + </body> + </html> +- diff --git a/www-apps/rpi-monitor/files/cpu.conf-2.10.patch b/www-apps/rpi-monitor/files/cpu.conf-2.10.patch new file mode 100644 index 00000000..d02cfb27 --- /dev/null +++ b/www-apps/rpi-monitor/files/cpu.conf-2.10.patch @@ -0,0 +1,82 @@ +--- rpimonitor/template/cpu.conf.dist 2015-03-14 15:01:33.369612000 +0000 ++++ rpimonitor/template/cpu.conf 2015-03-14 18:03:19.359612000 +0000 +@@ -7,42 +7,48 @@ + # - cpu load 1, 5, 15 - yes - yes + # - cpu scaling governor - yes - no + ######################################################################## +-dynamic.1.name=cpu_frequency +-dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq ++ ++dynamic.1.name=scaling_governor ++dynamic.1.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor + dynamic.1.regexp=(.*) +-dynamic.1.postprocess=$1/1000 ++dynamic.1.postprocess= + dynamic.1.rrd= + +-dynamic.2.name=cpu_voltage +-dynamic.2.source=vcgencmd measure_volts core +-dynamic.2.regexp=(\d+.\d+)V +-dynamic.2.postprocess= +-dynamic.2.rrd= +- +-dynamic.3.name=load1,load5,load15 +-dynamic.3.source=/proc/loadavg +-dynamic.3.regexp=^(\S+)\s(\S+)\s(\S+) ++dynamic.2.name=cpu_frequency ++dynamic.2.source=/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq ++dynamic.2.regexp=(.*) ++dynamic.2.postprocess=$1/1000 ++dynamic.2.rrd=GAUGE ++ ++dynamic.3.name=cpu_voltage ++dynamic.3.source=/opt/vc/bin/vcgencmd measure_volts core ++dynamic.3.regexp=(\d+.\d+)V + dynamic.3.postprocess= + dynamic.3.rrd=GAUGE + +-dynamic.4.name=scaling_governor +-dynamic.4.source=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor +-dynamic.4.regexp=(.*) ++dynamic.4.name=load1,load5,load15 ++dynamic.4.source=/proc/loadavg ++dynamic.4.regexp=^(\S+)\s(\S+)\s(\S+) + dynamic.4.postprocess= +-dynamic.4.rrd= ++dynamic.4.rrd=GAUGE ++ ++web.status.1.content.3.name=CPU ++web.status.1.content.3.icon=cpu.png ++#web.status.1.content.3.line.1="Loads: <b>" + data.load1 + "</b> [1 min] - <b>" + data.load5 + "</b> [5 min] - <b>" + data.load15 + "</b> [15 min]" ++web.status.1.content.3.line.1=JustGageBar("Load", "1 min", 0, data.load1, 3, 100, 80) + " " + JustGageBar("Load", "5 min", 0, data.load5, 3, 100, 80) + " " + JustGageBar("Load", "15 min", 0, data.load15, 3, 100, 80) ++web.status.1.content.3.line.2="CPU frequency: <b>" + data.cpu_frequency + "MHz</b> Voltage: <b>" + data.cpu_voltage + "V</b>" ++web.status.1.content.3.line.3="Scaling governor: <b>" + data.scaling_governor + "</b>" ++#web.status.1.content.3.line.4=InsertHTML("/addons/top3/top3.html") ++ ++web.statistics.1.content.1.name=CPU Speed ++web.statistics.1.content.1.graph.1=cpu_frequency ++web.statistics.1.content.1.ds_graph_options.cpu_frequency.label=Frequency (MHz) ++web.statistics.1.content.1.ds_graph_options.cpu_frequency.color="#FF7777" + +-web.status.1.content.1.name=CPU +-web.status.1.content.1.icon=cpu.png +-#web.status.1.content.1.line.1="Loads: <b>" + data.load1 + "</b> [1min] - <b>" + data.load5 + "</b> [5min] - <b>" + data.load15 + "</b> [15min]" +-web.status.1.content.1.line.1=JustGageBar("Load", "1min", 0, data.load1, 3, 100, 80)+" "+JustGageBar("Load", "5min", 0, data.load5, 3, 100, 80)+" "+JustGageBar("Load", "15min", 0, data.load15, 3, 100, 80) +-web.status.1.content.1.line.2="CPU frequency: <b>" + data.cpu_frequency + "MHz</b> Voltage: <b>" + data.cpu_voltage + "V</b>" +-web.status.1.content.1.line.3="Scaling governor: <b>" + data.scaling_governor + "</b>" +-#web.status.1.content.1.line.4=InsertHTML("/addons/top3/top3.html") +- +-web.statistics.1.content.1.name=CPU Loads +-web.statistics.1.content.1.graph.1=load1 +-web.statistics.1.content.1.graph.2=load5 +-web.statistics.1.content.1.graph.3=load15 +-web.statistics.1.content.1.ds_graph_options.load1.label=Load 1min +-web.statistics.1.content.1.ds_graph_options.load5.label=Load 5min +-web.statistics.1.content.1.ds_graph_options.load15.label=Load 15min ++web.statistics.1.content.2.name=CPU Loads ++web.statistics.1.content.2.graph.1=load1 ++web.statistics.1.content.2.graph.2=load5 ++web.statistics.1.content.2.graph.3=load15 ++web.statistics.1.content.2.ds_graph_options.load1.label=Load (1 min) ++web.statistics.1.content.2.ds_graph_options.load5.label=Load (5 min) ++web.statistics.1.content.2.ds_graph_options.load15.label=Load (15 min) diff --git a/www-apps/rpi-monitor/files/daemon.conf-2.10.patch b/www-apps/rpi-monitor/files/daemon.conf-2.10.patch new file mode 100644 index 00000000..28199316 --- /dev/null +++ b/www-apps/rpi-monitor/files/daemon.conf-2.10.patch @@ -0,0 +1,95 @@ +--- rpimonitor/daemon.conf.dist 2015-03-12 00:31:39.749612000 +0000 ++++ rpimonitor/daemon.conf 2015-03-12 00:41:11.909612000 +0000 +@@ -5,53 +5,50 @@ + # if embedded server should be started and its configuration. + # + ######################################################################## +-# +-# daemon.sharedmemkey=20130906 +-# Define the share memory key ++ ++# Shared memory key + #daemon.sharedmemkey=20130906 +-# +-# daemon.delay=10 +-# Define the delay between 2 kpi pooling (default:10) +-# Note: If you want to change the default delay, the rrd file will +-# have to be deleted rpimonitord will recreate them at next startup ++ ++# Delay in seconds between polling statistics ++# ++# Note: If you want to change the default delay, the rrd file will have ++# to be deleted rpimonitord will recreate them at next startup + #daemon.delay=10 +-# +-# daemon.timeout=10 +-# Define the maximul duration of KPI extraction (default:5) +-#daemon.timeout=10 +-# +-# daemon.noserver=1 +-# Define that rpimonitor shouldn't start web server (default:0) +-# Note: A symbolic link from /var/lib/rpimonitor/stat to +-# /usr/share/rpimonitor/stat may be required +-#daemon.noserver=1 +-# +-# daemon.addr=0.0.0.0 +-# Define the address used by the web server (default:0.0.0.0) ++ ++# Maximum duration of statistic extraction ++#daemon.timeout=5 ++ ++# Set to '1' to prevent rpimonitor from starting it's built-in ++# web-server ++# ++# Note: A symbolic link from /var/lib/rpimonitor/stat to ++# /usr/share/rpimonitor/stat may be required ++#daemon.noserver=0 ++ ++# Internal web-server bind address + #daemon.addr=0.0.0.0 +-# +-# daemon.port=8888 +-# Define port of the web server (default:8888) +-#daemon.port=8889 +-# +-# daemon.user=pi +-# Define user used to run the server process (default:pi) +-# Note: If user is not existing, process will run with uid=1000 ++ ++# Internal web-server listen port ++#daemon.port=8888 ++ ++# Run internal web-server as user ++# ++# Note: If specified user does not exist, the web-server will run ++# with uid=1000 + #daemon.user=pi +-# +-# daemon.group=pi +-# Define group used to run the server process (default:pi) +-# Note: If group is not existing, process will run with gid=1000 ++ ++# Run internal web-server as group ++# Note: If specified group does not exist, the web-server will run ++# with gid=1000 + #daemon.group=pi +-# +-# daemon.webroot=/usr/share/rpimonitor/web +-# Define the root directory of the web server (Default:/usr/share/rpimonitor/web) ++ ++# Web-server root directory + #daemon.webroot=/usr/share/rpimonitor/web +-# +-# daemon.datastore=/var/lib/rpimonitor +-# Define the data storage directory (Default:/var/lib/rpimonitor) ++ ++# Data storage directory + #daemon.datastore=/var/lib/rpimonitor +-# +-# daemon.shellinabox=https://0.0.0.0:4200/ +-# Define shellinabox address (Default: calculated automatically based on http request) ++ ++# shellinabox bind address ++# ++# Default: calculated automatically based on request + #daemon.shellinabox=https://127.0.0.1:4200/ diff --git a/www-apps/rpi-monitor/files/gentoo.conf-2.10.patch b/www-apps/rpi-monitor/files/gentoo.conf-2.10.patch new file mode 100644 index 00000000..335bf003 --- /dev/null +++ b/www-apps/rpi-monitor/files/gentoo.conf-2.10.patch @@ -0,0 +1,560 @@ +--- rpimonitor/template/gentoo.conf 2015-01-06 17:49:46.000000000 +0000 ++++ rpimonitor/template/gentoo.conf 2015-03-14 15:40:02.279612000 +0000 +@@ -1,267 +1,260 @@ + ######################################################################## + # +-# KPI extraction configuration ++# Data extraction configuration + # +-# This part of the configuration file is defining which data to +-# extract how to extract them and when. ++# This configuration file defines how and when data should be ++# extracted. + # +-# Specific 'include' keyword is available to add a file at the end of +-# the list of configuration files to be loaded. ++# The 'include' keyword can be used to append additional configuration ++# files to the list to be processed: + # + # include=<full path to configuration file> +-# <full path to configuration file> is the full path to the +-# configuration file to add at the end of the list of configuration +-# files to be loaded. +-# +-# Static KPI are extracted once at rpimonitord startup. Each statistic +-# is identified into the conf file by a line stating with the keyword +-# static and an identifier <static data id> + # +-# Each static KPI is defined by an id and with 4 parameters ++# Static items are extracted once on rpimonitord startup. Each ++# statistic is specified below by a line starting with the keyword ++# 'static' and followed by a numerical unique identifier. ++# ++# Each static item has four further parameters: + # + # static.<static data id>.name=<data name> +-# <data name> is a string representing the KPI or the list of KPI +-# separated by comma. Each name has to be unique. +-# Only alpha numerical charter and underscore are accepted. +-# +-# static.<static data id>.source=<data source> +-# <data source> is a file or an executable file within the path. +-# If the file exists, rpimonitord will read its content. If the file +-# is not existing, rpimonirotd will try to execute it and will parse +-# the output. ++# <data name> is the string represention the item (or comma-separated ++# items) being defined. Each name must be unique. ++# Only alpha-numeric charaters and underscores are valid in item ++# names. ++# ++# static.<static data id>.source=<data source>[,<data source,...] ++# <data source> may be a file or an executable from which content ++# can be read. If a full path is not provided, rpimonitord will ++# first attempt to read from a file with the specified name and, ++# failing this, will attempt to execute a binary of the same name ++# within any directory specified in the contents of the PATH ++# vaiable. + # Warning: specifying an executable by its absolute name will tell +-# rpimonitord to read the content of the executable.1.graph. ++# rpimonitord to read the content of <executable>.1.graph. + # +-# static.<static data id>.regexp=<data regexp> +-# <data regexp> is the regular expression extracting information from +-# data source. Regexp groups () has to be used to extract the data +-# In case of KPI list, each group will be affected to a KPI name. ++# static.<static data id>.regexp=<data regex> ++# <data regex> is an optional regular expression which may be ++# applied to extract information from the designated source value, ++# as above. Data matching a Perl-Compatible/Extended Regular ++# Expression group (e.g. matches within round-brackets) will be ++# selected to represent this <data source>. ++# Where a list of <data source>s is defined, each sequential group ++# match will be assigned to each <data source> in turn. + # + # static.<static data id>.postprocess=<data postprocess> +-# <data postprocess> is an expression defining the postprocessing to +-# be applied on result. KPI are idendified by $1. In case of list, +-# other KPI are identified by $2, $3 .graph.. +-# This parameter will be evaluate by the command eval of perl. +-# +-# Dynamic KPI are extracted periodically (defined by daemon.delay) +-# Each statistic is identified into the conf file by a line stating +-# with the keyword dynamic and an identifier <dynamic data id> +-# +-# Each dynamic KPI is defined by an id and with 5 parameters ++# <data postprocess> is an optional expression specifying any ++# postprocessing which should be applied to the raw <data source>, or ++# the <data regex> output if defined. ++# The first <data source> is referenced as '$1', with further <data ++# source>s in a list being referred to as '$2', '$3', etc. ++# The expression will be evaluated via the Perl 'eval' command. ++# ++# Dynamic items are periodically evaluated with an interval specified ++# by 'daemon.delay' in /etc/rpimonitord.conf. Each statistic is ++# defined by the 'dynamic' keyword followed by a <dynamic data id> ++# identifier and five further parameters: + # +-# dynamic.<dynamic data id>.name=<data name> ++# dynamic.<dynamic data id>.name=<data name>[,<data name>,...] + # dynamic.<dynamic data id>.source=<data source> +-# dynamic.<dynamic data id>.regexp=<data regexp> ++# dynamic.<dynamic data id>.regexp=<data regex> + # dynamic.<dynamic data id>.postprocess=<data postprocess> +-# <data name>, <data source>, <data regexp>, <data postprocess> +-# This 4 first parameters have the same signification as for static +-# parameters. +-# +-# dynamic.<dynamic data id>.rrd=<|GAUGE|COUNTER|DERIVE|ABSOLUTE|COMPUTE> +-# The 5th parameter is defining if the KPI has to be stored into a RRD +-# database and how <|GAUGE|COUNTER|DERIVE|ABSOLUTE|COMPUTE>. If the +-# parameter is defined as empty, no RRD database will be created. If +-# this parameter is defined, a RRD database will be created and data +-# will be stored at every extraction. +-# Ref http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html for RRD +-# parameter description. +-# dynamic.<dynamic data id>.min=<minimal value acceptable in RRD> +-# dynamic.<dynamic data id>.max=<miximal value acceptable in RRD> +-# If a value extracted by is less than minimal of greater than maximal +-# value, it will be stored int RRD database as unknown. +-# These limits are usefull to handle counter that fall down to 0 when +-# they reach their limit (Ex: network graphs) +-# +-# Note: Static values are accessible for the post processing using the +-# variable $this->{'static'}->{'static_data_name'} and can be used. +-# You can refer to swap data extraction to see an example. ++# <data name>, <data source>, <data regex>, and <data postprocess> ++# have the same meanings as when used with static items. ++# ++# dynamic.<dynamic data id>.rrd=<GAUGE|COUNTER|DERIVE|ABSOLUTE|COMPUTE> ++# The fifth parameter determines whether the item's data should be ++# stored in an Round-Robin Database, and how it should be ++# represented. A blank entry will prevent RRD creation. ++# See http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html for ++# details of the RRD different RRD options. ++# ++# NB: Values associated with named static items are available for use ++# during post-processing with the notation: ++# ++# $this->{'static'}->{'static_data_name'} ++# ++# See the dynamic item named 'swap_used' for a real-world example. + # + ######################################################################## + # +-# Web interface configuration ++# Web interface quick-links configuration + # +-# Friends are defining a displayed name and a link reachable from a +-# top left menu visible if at least one friends is configured. Each +-# friend is identified by its <id> and is described by the 2 following +-# parameters ++# 'friends' are links shown in the top-left menu, visible once at least ++# one friend is configured. Each friend is defined by a the keyword ++# 'web.friends' followed by a numerical unqiue identifier and each of ++# two additional parameters: + # + # web.friends.<id>.name=<display name> +-# web.friends.<id>.link=<link to RPi-Monitor> +-# +-# web.friends.<id>.name=<display name> +-# <display name> is the name printed into the drop down menu ++# web.friends.<id>.link=<URL> ++# ++# 'friends' are envisaged to provide an easy way to link multiple ++# rpimonitord instances across different hosts. + # +-# web.friends.<id>.link=<link to RPi-Monitor> +-# <link to RPi-Monitor> is the link to another RPi-Monitor running +-# into the friend machine. ++# Web interface configuration + # + # web.page.icon=<icon location relative to webroot> +-# <icon location relative to webroot> is the path and filename of +-# the icon to be displayed into RPi-Monitor title bar ++# <icon location relative to webroot> is the URI of the icon to be ++# displayed in the browser address bar. ++# ++# web.page.menutitle=<menu title js> ++# <menu title js> is javascript code used to populate the rpimonitord ++# title-bar. ++# Metrics in the 'data' object such as 'data.hostname' may be ++# referenced. ++# ++# web.page.pagetitle=<page title js> ++# <page title js> is javascript code used to populate the rpimonitord ++# website title, as shown by the browser window/tab. ++# Metrics in the 'data' object such as 'data.hostname' may be ++# referenced. + # +-# web.page.menutitle=<menu title> +-# <menu title> javascript code defining the text displayed into +-# RPi-Monotor title bar. This code can use status information with +-# the keyword 'data' including the 'data.hostname' available natively +-# +-# web.page.pagetitle=<page title> +-# <page title> javascript code defining the text displayed into +-# tab and window title bar. This code can use status information with +-# the keyword 'data' including the 'data.hostname' available natively +-# +-# The status page is fully configurable. +-# It is possible to define multiple pages. Each page is identified by +-# its <page id>. ++# Web interface status pages ++# ++# It is possible to define multiple status pages. Each page is ++# identified by its <page id>: + # + # web.status.<page id>.name=<page name> +-# <page name> name of the page displayed into the drop down menu in +-# case of multiple pages. ++# <page name> is the name of the page as displayed in the drop down ++# menu which is shown when multiple pages are defined. + # +-# Status page is split in strips displaying information. Each status +-# strip is identified by a unique <status id>. Each status strip is +-# defined by a name, an icon and a serie of lines described as follow: +-# +-# web.status.<page id>.visibility=<visibility formula> +-# +-# <visibility forlula> should be a valid javascript formula returning +-# 0: to hide the row +-# anything else but 0: show the row ++# Each status page is split into horizontal rows. Each status row is ++# identified by a unique <status id>, and is given a name, an icon and ++# a series of entries as follows: ++# ++# web.status.<page id>.visibility=<condition js> ++# <conditoin js> is a javascript statement which will cause the row ++# to be hidden if it evaluates to zero, or shown otherwise. + # + # web.status.<page id>.content.<status id>.name=<display name> ++# <display name> is the row title. ++# + # web.status.<page id>.content.<status id>.icon=<display icon> +-# web.status.<page id>.content.<status id>.line.<line number>=<parameter> ++# <display icon> is the icon for the row. ++# ++# web.status.<page id>.content.<status id>.line.<line>=<expression js> ++# <line> represents the numerical position of the line within the ++# row. This number must be unique for a given row. ++# <expression js> specifies the content of the line, and will be ++# rendered by a javascript 'eval()' call. ++# For ease of use, rpimonitord provides several functions which can ++# be used within the provided expression: ++# ++# Uptime( seconds ) ++# Output the time <seconds> in the following format: ++# XX year XX days XX hours XX minutes XX seconds ++# ++# Pad( value ) ++# Add a prefix '0' for any <value> less than 10; ++# ++# KMG( value, pre ) ++# Output <value> in units of "kilo", "mega", "giga", or "peta". ++# <pre> specifies the magnitude of the output required, and ++# should be 'k', 'M', 'G', or 'P'; ++# ++# Percent( value, total ) ++# Output the ratio of <value> to <total> as a percentage; ++# ++# ProgressBar( value, total, warning, danger ) ++# Draw a progressbar representing the ratio of <value> compared ++# to <total>: ++# ++# [=========------------] ++# ++# The default color of bar is blue, but will be rendered in ++# orange if the ratio of <value> to <total> is greater than ++# <warning> as a percentage, and red if above <danger>; ++# ++# JustGageBar( title, label, min, value, max, width, height, ++# levelColors, warning, critical ) ++# Draw a half-circular gauge: ++# <title> - Text to render above the gauge; ++# <label> - Text to render below the gauge; ++# <min> - Minimum gauge value; ++# <value> - Quantity to be shown; ++# <max> - Maximum gauge value; ++# <width>, <height> - Size of the gauge in pixels; ++# <levelColors> - An array of [normal, warning, danger] colour ++# values in hexadecimal notation, defaulting to ++# [green, orange, red]. Default colours are stored ++# in the 'precentColors' array. ++# <warning> - Gauge level as a percentage to render in the ++# second colour of <levelColors>; ++# <critical> - Gauge level as a percentage to render in the ++# third colour of <levelColors>; ++# ++# Plural( value ) ++# Output "s " if <value> is greater than one, or " " otherwise; + # +-# web.status.<page id>.content.<status id>.name=<display name> +-# <display name> Name displayed as title of the strip ++# Clock( data.localtime ) ++# Display a clock with incrementing seconds. Use only with ++# 'data.localtime' as an argument; ++# ++# Label( data, expression, text, level ) ++# Badge( data, expression, text, level ) ++# These functions will output a label or badge with a specified ++# background color if the provided expression evaluates to true: ++# <data> - Input to <expression>; ++# <expression> - Evaluated against <data> to determine whether ++# to display label or badge; ++# <text> - Text to output; ++# <level> - 'default' (grey), ++# 'primary' (blue label/grey badge), ++# 'success' (green), ++# 'info' (cyan), ++# 'warning' (orange) ++# 'danger' (red); ++# ++# InsertHTML( url ) ++# This function is used to insert raw HTML within a page. ++# (See the 'Top3' example showing the process with highest cpu ++# usage) ; + # +-# web.status.<page id>.content.<status id>.icon=<display icon> +-# <display icon> Icon of the strip ++# The 'data' object is also available and contains all dynamic and ++# static metrics explained above. ++# ++# Web interface statistics pages + # +-# web.status.<page id>.content.<status id>.line.<line number>=<parameter> +-# <line number> represent the position of the line within the strip. +-# This number has to be unique within the strip. +-# <parameter> is describing the content of the line. This parameter +-# will be evaluated by the javascript command with the function +-# eval() theirfore parameter should be valid javacript. +-# To have clean rendering, RPi-Monitor web interface provides some +-# functions that could be used inside the parameter. The object data +-# is also available and contains the result of dynamic and static +-# extracted as described in the KPI extraction section. +-# +-# Functions provided by RPi-Monitor are the following: +-# +-# Uptime(uptime in sec) +-# Print the uptime from seconds to the following format: +-# XX year XX days XX hours XX minutes XX seconds +-# +-# Pad(value) +-# Add a prefixed 0 for number smaller than 10 +-# +-# KMG(value, pre) +-# Print value in kilo, Mega, Giga, Peta. +-# pre can be 'k', 'M', 'G' or 'P' depending on the value. +-# +-# Percent(value,total) +-# Print percentage of value compared to total +-# +-# ProgressBar(value,total,warning, danger) +-# Draw a progressbar representing the value compared to total. +-# [=========------------] +-# The default color of pregressbar is blue. +-# If warning value is lower than critical, progressbar color will +-# be orange if percentage is higher than warning value and red +-# if the percentage is higher than danger value +-# If warning value is higher than critical, progressbar color will +-# be orange if percentage is lower than warning value and red +-# if the percentage is lower than danger value +-# +-# JustGageBar(title, label,min, value, max, width, height, levelColors, warning, critical) +-# Draw a half-circular gauge +-# title : Title of the gauge (located on to of the gauge) +-# label : Label of the gauge (located under the value) +-# min : min value of the gauge +-# value : value to be drawn +-# max : max value of the gauge +-# width, height : size of the gauge +-# levelColors : Array defining colors of each level [normal,warning,critical] +-# (in Hex format), default: green, orange and red. +-# Default colors are available into the array 'percentColors'. +-# warning : Warning level (in %) used to define color (default: 33) +-# critical : Critical level (in %) used to define color (default: 66) +-# +-# Plural (value) +-# Print 's ' if value > 1 or ' ' if not. +-# +-# Clock(data.localtime) +-# This function is a little bit particular and should be written +-# and should be written exactly as in the upper line. It will +-# display on screen the current time and will simulate the +-# seconds by incrementing them periodically. +-# +-# Label(data,formula, text, level) +-# Badge(data,formula, text, level) +-# This function will write a label/badge with a defined +-# background color if the formula return TRUE. +-# data : data to use with the formula +-# formula : formula evaluated in regards to data to determine +-# if label/badge has to be printed +-# text : text to be displayed +-# level : 'default' (grey), 'primary' (blue label/grey badge), +-# 'success' (green), 'info' (cyan), 'warning' (orange) +-# or 'danger' (red) +-# +-# InsertHTML(url) +-# This function is used to insert an HTML information inside +-# a page. (Ref Top3 example showing top most process cpu usage) +-# +-# The statistic page is fully configurable. +-# It is possible to define multiple pages. Each page is identified by +-# its <page id>. ++# It is possible to define multiple statistics pages. Each page is ++# identified by its <page id>: + # + # web.status.<page id>.name=<page name> +-# <page name> name of the page displayed into the drop down menu in +-# case of multiple pages. ++# <page name> is the name of the page as displayed in the drop down ++# menu which is shown when multiple pages are defined. + # +-# The statistic page displays statistics graphs. The graphs are +-# identified an unique <statistic id> and by the following parameters. ++# Statistics page display graphs which are identified by a unique ++# <statistic id> and accept the following parameters: + # +-# web.statistics.<page id>.content.<statistic id>.name=<statistic name> +-# <statistic name> is the name of the statistics displayed in the +-# top left drop down list. +-# +-# web.statistics.<page id>.content.<statistic id>.graph.<rrd id>=<data name> +-# <rrd id> is identifying the graph and is unique per <statistic id> +-# <data name> is the name of the dynamic and static extracted as +-# described in the KPI extraction section. +-# +-# web.statistics.<page id>.content.<statistic id>.ds_graph_options.<data name>.label=<label> +-# <data name> same as the previous <data name> +-# <label> Label to display in legends. It is possible to setup other parameters +-# of ds_graph_options. Refer to the following web page for details: +-# http://javascriptrrd.sourceforge.net/docs/javascriptrrd_v0.5.0/doc/lib/rrdFlot_js.html ++# web.statistics.<page id>.content.<statistic id>.name=<display name> ++# <display name> is text to show in the drop-down list of statistics. + # ++# web.statistics.<page id>.content.<statistic id>.graph.<rrd id>=<name> ++# <rrd id> is unique per <statistic id>, ++# <name> is the name of the extracted static or dynamic value to ++# further configure. ++# ++# web.statistics.<page id>.content.<statistic id>.ds_graph_options.<name>.label=<label> ++# <name> should match a <name> value from .graph.<rrd id>. ++# <label> is the display-name of the graph being configured. ++# + # web.statistics.<page id>.content.<statistic id>.graph_options.<parameter>=<value> +-# <parameter> and <value> can be find into the same web page as previous +-# parameter. This allow to customize the graph and axis. ++# It is possible to specify further parameters of ds_graph_options, ++# see the following link for details: ++# http://javascriptrrd.sourceforge.net/docs/javascriptrrd_v0.5.0/doc/lib/rrdFlot_js.html ++# ++# rpimonitord must be restarted when this file is updated. + # +-# Example file are available in the template directory (prefixed by 'example'). +-# To understand how a feature is behaving, you can include this example file +-# using the 'include' directive. +-# These include directive are already written (commented) into the default +-# configuration file: raspbian.conf +-# When configuration files change, it is required to restart rpimonitor. + ####################################################################### + +-#web.friends.1.name=Raspberry Pi +-#web.friends.1.link=http://192.168.0.123/ +-#web.friends.2.name=Shuttle ++#web.friends.1.name=First Raspberry Pi ++#web.friends.1.link=http://192.168.0.1/ ++#web.friends.2.name=Second Raspberry Pi + #web.friends.2.link=http://192.168.0.2/ +-#web.friends.3.name=Netbook +-#web.friends.3.link=http://192.168.0.38/ ++#web.friends.3.name=Third Raspberry Pi ++#web.friends.3.link=http://192.168.0.3/ + + web.page.icon='img/logo.png' +-web.page.menutitle='RPi-Monitor <sub>('+data.hostname+')</sub>' +-web.page.pagetitle='RPi-Monitor ('+data.hostname+')' ++web.page.menutitle='RPi-Monitor <sub>(' + data.hostname + ')</sub>' ++web.page.pagetitle='RPi-Monitor (' + data.hostname + ')' + + web.status.1.name=Raspberry Pi + #web.status.2.name=Home +@@ -270,44 +263,45 @@ + + web.addons.1.name=Addons + web.addons.1.addons=about +-#web.addons.1.name=Shellinabox +-#web.addons.1.addons=shellinabox + +-#web.addons.2.name=Addons example +-#web.addons.2.addons=example +-#web.addons.2.showTitle=0 ++#web.addons.2.name=Shell-in-a-box ++#web.addons.2.addons=shellinabox + +-#web.addons.3.name=Webcam - Hawkeye ++#web.addons.3.name=Addons Example ++#web.addons.3.addons=example + #web.addons.3.showTitle=0 +-#web.addons.3.addons=custom +-#web.addons.3.url=http://0:8000/ + +-#web.addons.4.name=Custom addons ++#web.addons.4.name=Hawkeye Webcam (https://github.com/ipartola/hawkeye) + #web.addons.4.addons=custom + #web.addons.4.showTitle=0 +-#web.addons.4.url=/addons/custom/custominfo.html +- +-#web.addons.5.name=Top3 +-#web.addons.5.addons=top3 +- +-#include=/etc/rpimonitor/template/example.justgage.conf +-#include=/etc/rpimonitor/template/example.badge_and_label.conf +-#include=/etc/rpimonitor/template/example.progressbar.conf +-#include=/etc/rpimonitor/template/example.visibility.conf +- +-include=/etc/rpimonitor/template/version.conf +-include=/etc/rpimonitor/template/uptime.conf +-include=/etc/rpimonitor/template/cpu.conf +-include=/etc/rpimonitor/template/temperature.conf +-include=/etc/rpimonitor/template/memory.conf +-include=/etc/rpimonitor/template/swap.conf +-include=/etc/rpimonitor/template/sdcard.conf +-include=/etc/rpimonitor/template/network.conf +- +-#include=/etc/rpimonitor/template/printer.conf +-#include=/etc/rpimonitor/template/storage.conf +-#include=/etc/rpimonitor/template/services.conf +-#include=/etc/rpimonitor/template/wlan.conf +-#include=/etc/rpimonitor/template/dht11.conf +- ++#web.addons.4.url=http://192.168.0.4:8000/ + ++#web.addons.5.name=Custom addons ++#web.addons.5.addons=custom ++#web.addons.5.showTitle=0 ++#web.addons.5.url=/addons/custom/custominfo.html ++ ++#web.addons.6.name=Top3 ++#web.addons.6.addons=top3 ++ ++# Usage examples: ++#include=/etc/rpimonitord.conf.d/example.justgage.conf ++#include=/etc/rpimonitord.conf.d/example.badge_and_label.conf ++#include=/etc/rpimonitord.conf.d/example.progressbar.conf ++#include=/etc/rpimonitord.conf.d/example.visibility.conf ++ ++include=/etc/rpimonitord.conf.d/version.conf ++include=/etc/rpimonitord.conf.d/uptime.conf ++include=/etc/rpimonitord.conf.d/cpu.conf ++include=/etc/rpimonitord.conf.d/temperature.conf ++include=/etc/rpimonitord.conf.d/memory.conf ++include=/etc/rpimonitord.conf.d/swap.conf ++include=/etc/rpimonitord.conf.d/sdcard.conf ++include=/etc/rpimonitord.conf.d/network.conf ++ ++# Further real-world examples: ++#include=/etc/rpimonitord.conf.d/printer.conf ++#include=/etc/rpimonitord.conf.d/storage.conf ++#include=/etc/rpimonitord.conf.d/services.conf ++#include=/etc/rpimonitord.conf.d/wlan.conf ++#include=/etc/rpimonitord.conf.d/dht11.conf diff --git a/www-apps/rpi-monitor/files/memory.conf-2.10.patch b/www-apps/rpi-monitor/files/memory.conf-2.10.patch new file mode 100644 index 00000000..e307aa41 --- /dev/null +++ b/www-apps/rpi-monitor/files/memory.conf-2.10.patch @@ -0,0 +1,116 @@ +--- rpimonitor/template/memory.conf.dist 2015-03-14 15:13:47.409612000 +0000 ++++ rpimonitor/template/memory.conf 2015-03-14 15:46:38.469612000 +0000 +@@ -6,34 +6,88 @@ + # - memory free - yes - yes + # - memory available - yes - yes + ######################################################################## +-static.5.name=memory_total +-static.5.source=/proc/meminfo +-static.5.regexp=MemTotal:\s+(\d+) +-static.5.postprocess=$1/1024 +- +-dynamic.9.name=memory_free +-dynamic.9.source=/proc/meminfo +-dynamic.9.regexp=MemFree:\s+(\d+) +-dynamic.9.postprocess=$1/1024 ++ ++#static.11.name=tmpfs_ram_total ++#static.11.source=df /mnt/ram ++#static.11.regexp=^[^\s]+\s+(\d+) ++#static.11.postprocess=$1/1024 ++ ++dynamic.9.name=memory_total ++dynamic.9.source=/opt/vc/bin/vcgencmd get_mem arm ++dynamic.9.regexp=^.*=(\d+)M$ ++dynamic.9.postprocess= + dynamic.9.rrd=GAUGE + +-dynamic.15.name=memory_available +-dynamic.15.source=/usr/bin/free -mk +-dynamic.15.regexp=^-\/\+ buffers\/cache:\s+\d+\s+(\d+) +-dynamic.15.postprocess=$1/1024 +-dynamic.15.rrd=GAUGE ++dynamic.10.name=memory_gpu ++dynamic.10.source=/opt/vc/bin/vcgencmd get_mem gpu ++dynamic.10.regexp=^.*=(\d+)M$ ++dynamic.10.postprocess= ++dynamic.10.rrd=GAUGE ++ ++dynamic.11.name=memory_free ++dynamic.11.source=/proc/meminfo ++dynamic.11.regexp=MemFree:\s+(\d+) ++dynamic.11.postprocess=$1/1024 ++dynamic.11.rrd=GAUGE ++ ++dynamic.12.name=memory_used ++dynamic.12.source=/proc/meminfo ++dynamic.12.regexp=MemFree:\s+(\d+) ++dynamic.12.postprocess=$this->{'dynamic'}->{'memory_total'} - ($1/1024) ++dynamic.12.rrd=GAUGE ++ ++dynamic.13.name=memory_available ++dynamic.13.source=/usr/bin/free -mk ++dynamic.13.regexp=^-\/\+ buffers\/cache:\s+\d+\s+(\d+) ++dynamic.13.postprocess=$1/1024 ++dynamic.13.rrd=GAUGE ++ ++#dynamic.20.name=tmpfs_ram_used ++#dynamic.20.source=df /mnt/ram ++#dynamic.20.regexp=^[^\s]+\s+\d+\s+(\d+) ++#dynamic.20.postprocess=$1/1024 ++#dynamic.20.rrd=GAUGE + + web.status.1.content.5.name=Memory + web.status.1.content.5.icon=memory.png +-web.status.1.content.5.line.1="Used: <b>" + KMG(data.memory_total-data.memory_available,'M') + "</b> (<b>" + Percent(data.memory_total-data.memory_available,data.memory_total,'M') + "</b>) Available: <b>" + KMG(data.memory_available,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>" +-web.status.1.content.5.line.2=ProgressBar(data.memory_total-data.memory_available,data.memory_total) ++web.status.1.content.5.line.1="Used: <b>" + KMG(data.memory_used,'M') + "</b> (<b>" + Percent(data.memory_used,data.memory_total,'M') + "</b>) Free: <b>" + KMG(data.memory_free,'M') + "</b> Available: <b>" + KMG(data.memory_available,'M') + "</b> Total: <b>" + KMG(data.memory_total,'M') + "</b>" ++web.status.1.content.5.line.2="GPU: <b>" + KMG(data.memory_gpu,'M') + "</b>" ++web.status.1.content.5.line.3=ProgressBar(data.memory_used,data.memory_total) ++ ++#web.status.1.content.8.name=RAM fs ++#web.status.1.content.8.icon=memory.png ++#web.status.1.content.8.line.1="Used: <b>" + KMG(data.tmpfs_ram_used,'M') + "</b> (<b>" + Percent(data.tmpfs_ram_used,data.tmpfs_ram_total,'M') + "</b>) Free: <b>" + KMG(data.tmpfs_ram_total-data.tmpfs_ram_used,'M') + "</b> Total: <b>" + KMG(data.tmpfs_ram_total,'M') + "</b>" ++#web.status.1.content.8.line.2=ProgressBar(data.tmpfs_ram_used,data.tmpfs_ram_total) ++ ++#web.statistics.1.content.6.name=tmpfs - RAM ++#web.statistics.1.content.6.graph.1=tmpfs_ram_total ++#web.statistics.1.content.6.graph.2=tmpfs_ram_used ++#web.statistics.1.content.6.ds_graph_options.tmpfs_ram_total.label=Size of /mnt/ram (MB) ++#web.statistics.1.content.6.ds_graph_options.tmpfs_ram_total.color="#FF7777" ++#web.statistics.1.content.6.ds_graph_options.tmpfs_ram_used.label=Used on /mnt/ram (MB) ++#web.statistics.1.content.6.ds_graph_options.tmpfs_ram_used.lines={ fill: true } ++#web.statistics.1.content.6.ds_graph_options.tmpfs_ram_used.color="#7777FF" + +-web.statistics.1.content.6.name=Memory +-web.statistics.1.content.6.graph.1=memory_total +-web.statistics.1.content.6.graph.2=memory_free +-web.statistics.1.content.6.graph.3=memory_available +-web.statistics.1.content.6.ds_graph_options.memory_total.label=Total Memory(MB) +-web.statistics.1.content.6.ds_graph_options.memory_free.label=Free Memory (MB) +-web.statistics.1.content.6.ds_graph_options.memory_free.color="#7777FF" +-web.statistics.1.content.6.ds_graph_options.memory_available.label=Available Memory (MB) +-web.statistics.1.content.6.ds_graph_options.memory_available.color="#77FF77" ++web.statistics.1.content.7.name=Memory ++web.statistics.1.content.7.graph.1=memory_available ++web.statistics.1.content.7.graph.2=memory_free ++web.statistics.1.content.7.graph.3=memory_used ++web.statistics.1.content.7.graph.4=memory_total ++web.statistics.1.content.7.graph.5=memory_gpu ++#web.statistics.1.content.7.graph.6=tmpfs_ram_total ++#web.statistics.1.content.7.graph.7=tmpfs_ram_used ++web.statistics.1.content.7.ds_graph_options.memory_available.label=Available Memory (MB) ++web.statistics.1.content.7.ds_graph_options.memory_available.color="#FF7700" ++web.statistics.1.content.7.ds_graph_options.memory_free.label=Free Memory (MB) ++web.statistics.1.content.7.ds_graph_options.memory_free.color="#77FF77" ++web.statistics.1.content.7.ds_graph_options.memory_used.label=Used Memory (MB) ++web.statistics.1.content.7.ds_graph_options.memory_used.color="#FF7777" ++web.statistics.1.content.7.ds_graph_options.memory_total.label=Total Memory (MB) ++web.statistics.1.content.7.ds_graph_options.memory_total.color="#7777FF" ++web.statistics.1.content.7.ds_graph_options.memory_gpu.label=GPU Memory (MB) ++web.statistics.1.content.7.ds_graph_options.memory_gpu.lines={ fill: true } ++web.statistics.1.content.7.ds_graph_options.memory_gpu.color="#FFFF77" ++#web.statistics.1.content.7.ds_graph_options.tmpfs_ram_total.label=Size of /mnt/ram (MB) ++#web.statistics.1.content.7.ds_graph_options.tmpfs_ram_total.color="#77FFFF" ++#web.statistics.1.content.7.ds_graph_options.tmpfs_ram_used.label=Used on /mnt/ram (MB) ++#web.statistics.1.content.7.ds_graph_options.tmpfs_ram_used.color="#FF77FF" diff --git a/www-apps/rpi-monitor/files/network.conf-2.10.patch b/www-apps/rpi-monitor/files/network.conf-2.10.patch new file mode 100644 index 00000000..a5920d44 --- /dev/null +++ b/www-apps/rpi-monitor/files/network.conf-2.10.patch @@ -0,0 +1,58 @@ +--- rpimonitor/template/network.conf.dist 2015-03-14 15:31:42.639612000 +0000 ++++ rpimonitor/template/network.conf 2015-03-14 15:34:12.979612000 +0000 +@@ -5,31 +5,32 @@ + # - recieved - yes - yes + # - send - yes - yes + ######################################################################## +-dynamic.10.name=net_received +-dynamic.10.source=/sys/class/net/eth0/statistics/rx_bytes +-dynamic.10.regexp=(.*) +-dynamic.10.postprocess=$1*-1 +-dynamic.10.rrd=DERIVE +-dynamic.10.max=0 + +-dynamic.11.name=net_send +-dynamic.11.source=/sys/class/net/eth0/statistics/tx_bytes +-dynamic.11.regexp=(.*) +-dynamic.11.postprocess= +-dynamic.11.rrd=DERIVE +-dynamic.11.min=0 ++dynamic.14.name=net_received ++dynamic.14.source=/sys/class/net/eth0/statistics/rx_bytes ++dynamic.14.regexp=(.*) ++dynamic.14.postprocess=$1*-1 ++dynamic.14.rrd=DERIVE ++dynamic.14.max=0 ++ ++dynamic.15.name=net_send ++dynamic.15.source=/sys/class/net/eth0/statistics/tx_bytes ++dynamic.15.regexp=(.*) ++dynamic.15.postprocess= ++dynamic.15.rrd=DERIVE ++dynamic.15.min=0 + + web.status.1.content.8.name=Network + web.status.1.content.8.icon=network.png +-web.status.1.content.8.line.1="Ethernet Sent: <b>"+KMG(data.net_send)+"<i class='icon-arrow-up'></i></b> Received: <b>"+KMG(Math.abs(data.net_received)) + "<i class='icon-arrow-down'></i></b>" ++web.status.1.content.8.line.1="Ethernet Sent: <b>" + KMG(data.net_send) + "<i class='icon-arrow-up'></i></b> Received: <b>" + KMG(Math.abs(data.net_received)) + "<i class='icon-arrow-down'></i></b>" + +-web.statistics.1.content.2.name=Network +-web.statistics.1.content.2.graph.1=net_send +-web.statistics.1.content.2.graph.2=net_received +-web.statistics.1.content.2.graph_options.yaxis={ tickFormatter: function (v) { if (Math.abs(v) > 1048576) return (Math.round(v*10/1024/1024)/10) + " MiB/s" ; if (Math.abs(v) > 1024) return (Math.round(v*10/1024)/10) + " KiB/s" ; else return v + " B/s" }, } +-web.statistics.1.content.2.ds_graph_options.net_send.label=Upload bandwidth (bytes) +-web.statistics.1.content.2.ds_graph_options.net_send.lines={ fill: true } +-web.statistics.1.content.2.ds_graph_options.net_send.color="#FF7777" +-web.statistics.1.content.2.ds_graph_options.net_received.label=Download bandwidth (bytes) +-web.statistics.1.content.2.ds_graph_options.net_received.lines={ fill: true } +-web.statistics.1.content.2.ds_graph_options.net_received.color="#77FF77" ++web.statistics.1.content.3.name=Network ++web.statistics.1.content.3.graph.1=net_send ++web.statistics.1.content.3.graph.2=net_received ++web.statistics.1.content.3.graph_options.yaxis={ tickFormatter: function (v) { if (Math.abs(v) > 1048576) return (Math.round(v*10/1024/1024)/10) + " MiB/s" ; if (Math.abs(v) > 1024) return (Math.round(v*10/1024)/10) + " KiB/s" ; else return v + " B/s" }, } ++web.statistics.1.content.3.ds_graph_options.net_send.label=Upload bandwidth (bytes) ++web.statistics.1.content.3.ds_graph_options.net_send.lines={ fill: true } ++web.statistics.1.content.3.ds_graph_options.net_send.color="#FF7777" ++web.statistics.1.content.3.ds_graph_options.net_received.label=Download bandwidth (bytes) ++web.statistics.1.content.3.ds_graph_options.net_received.lines={ fill: true } ++web.statistics.1.content.3.ds_graph_options.net_received.color="#77FF77" diff --git a/www-apps/rpi-monitor/files/rpimonitor.confd b/www-apps/rpi-monitor/files/rpimonitor.confd index c3865420..58294fc8 100644 --- a/www-apps/rpi-monitor/files/rpimonitor.confd +++ b/www-apps/rpi-monitor/files/rpimonitor.confd @@ -1,2 +1,2 @@ -# Define configuration file to use -#CONFFILE="-c /etc/rpimonitord.conf -c /etc/rpimonitord.conf.d/default.conf" +# Define configuration files to use +CONFFILES="-c /etc/rpimonitord.conf -c /etc/rpimonitord.conf.d/data.conf" diff --git a/www-apps/rpi-monitor/files/rpimonitor.initd b/www-apps/rpi-monitor/files/rpimonitor.initd index 4a67db71..2006848a 100644 --- a/www-apps/rpi-monitor/files/rpimonitor.initd +++ b/www-apps/rpi-monitor/files/rpimonitor.initd @@ -6,7 +6,7 @@ PERL="$( type -pf perl )" NAME=rpimonitord PIDFILE=/var/run/$NAME.pid DAEMON=/usr/sbin/$NAME -DAEMON_ARGS="-b ${PIDFILE}" +DAEMON_ARGS="-b ${PIDFILE} ${CONFFILES:+${CONFFILES}}" depend() { need net diff --git a/www-apps/rpi-monitor/files/rpimonitord-2.10.patch b/www-apps/rpi-monitor/files/rpimonitord-2.10.patch new file mode 100644 index 00000000..486fdde8 --- /dev/null +++ b/www-apps/rpi-monitor/files/rpimonitord-2.10.patch @@ -0,0 +1,15 @@ +--- rpimonitor/rpimonitord.dist 2015-03-14 19:01:48.049612000 +0000 ++++ rpimonitor/rpimonitord 2015-03-14 19:04:23.919612000 +0000 +@@ -61,8 +61,10 @@ + $_ = abs_path($0); + my ($path,$file) = /(.*)\/([^\/]*)$/; + +- push(@{$this->{'daemon'}->{'confFiles'}},"/etc/rpimonitor/data.conf"); +- push(@{$this->{'daemon'}->{'confFiles'}},"/etc/rpimonitor/daemon.conf"); ++ if( scalar( @{$this->{'daemon'}->{'confFiles'}} < 2 )) { ++ push(@{$this->{'daemon'}->{'confFiles'}},"/etc/rpimonitor/data.conf") if -r "/etc/rpimonitor/data.conf"; ++ push(@{$this->{'daemon'}->{'confFiles'}},"/etc/rpimonitor/daemon.conf") if -r "/etc/rpimonitor/daemon.conf"; ++ } + + foreach ( @{$this->{'daemon'}->{'confFiles'}} ) { + #print "$_\n"; diff --git a/www-apps/rpi-monitor/files/sdcard.conf-2.10.patch b/www-apps/rpi-monitor/files/sdcard.conf-2.10.patch new file mode 100644 index 00000000..528b967d --- /dev/null +++ b/www-apps/rpi-monitor/files/sdcard.conf-2.10.patch @@ -0,0 +1,89 @@ +--- rpimonitor/template/sdcard.conf.dist 2015-03-14 15:25:17.659612000 +0000 ++++ rpimonitor/template/sdcard.conf 2015-03-14 15:47:41.519612000 +0000 +@@ -7,49 +7,50 @@ + # - boot total - yes - yes + # - boot used - yes - yes + ######################################################################## +-static.7.name=sdcard_root_total +-static.7.source=df / +-static.7.regexp=\S+\s+(\d+).*\/$ +-static.7.postprocess=$1/1024 +- +-static.8.name=sdcard_boot_total +-static.8.source=df /boot +-static.8.regexp=\S+\s+(\d+).*\/boot$ ++ ++static.8.name=sdcard_root_total ++static.8.source=df / ++static.8.regexp=^\S+\s+(\d+).*\/$ + static.8.postprocess=$1/1024 + +-dynamic.6.name=sdcard_root_used +-dynamic.6.source=df / +-dynamic.6.regexp=\S+\s+\d+\s+(\d+).*\/$ ++static.9.name=sdcard_boot_total ++static.9.source=df /boot ++static.9.regexp=^\S+\s+(\d+).*\/boot$ ++static.9.postprocess=$1/1024 ++ ++dynamic.5.name=sdcard_root_used ++dynamic.5.source=df / ++dynamic.5.regexp=^\S+\s+\d+\s+(\d+).*\/$ ++dynamic.5.postprocess=$1/1024 ++dynamic.5.rrd=GAUGE ++ ++dynamic.6.name=sdcard_boot_used ++dynamic.6.source=df /boot ++dynamic.6.regexp=^\S+\s+\d+\s+(\d+).*\/boot$ + dynamic.6.postprocess=$1/1024 + dynamic.6.rrd=GAUGE + +-dynamic.7.name=sdcard_boot_used +-dynamic.7.source=df /boot +-dynamic.7.regexp=\S+\s+\d+\s+(\d+).*\/boot$ +-dynamic.7.postprocess=$1/1024 +-dynamic.7.rrd=GAUGE +- + web.status.1.content.7.name=SD card + web.status.1.content.7.icon=sd.png +-web.status.1.content.7.line.1="<b>/boot</b> Used: <b>"+KMG(data.sdcard_boot_used,'M')+"</b> (<b>"+Percent(data.sdcard_boot_used,data.sdcard_boot_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_boot_total-data.sdcard_boot_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_boot_total,'M') +"</b>" ++web.status.1.content.7.line.1="<b>/boot</b> Used: <b>" + KMG(data.sdcard_boot_used,'M') + "</b> (<b>" + Percent(data.sdcard_boot_used,data.sdcard_boot_total,'M') + "</b>) Free: <b>" + KMG(data.sdcard_boot_total-data.sdcard_boot_used,'M') + "</b> Total: <b>" + KMG(data.sdcard_boot_total,'M') + "</b>" + web.status.1.content.7.line.2=ProgressBar(data.sdcard_boot_used,data.sdcard_boot_total,60,80) +-web.status.1.content.7.line.3="<b>/</b> Used: <b>"+KMG(data.sdcard_root_used,'M') + "</b> (<b>" + Percent(data.sdcard_root_used,data.sdcard_root_total,'M')+"</b>) Free: <b>"+KMG(data.sdcard_root_total-data.sdcard_root_used,'M')+ "</b> Total: <b>"+ KMG(data.sdcard_root_total,'M') + "</b>" ++web.status.1.content.7.line.3="<b>/</b> Used: <b>" + KMG(data.sdcard_root_used,'M') + "</b> (<b>" + Percent(data.sdcard_root_used,data.sdcard_root_total,'M') + "</b>) Free: <b>" + KMG(data.sdcard_root_total-data.sdcard_root_used,'M') + "</b> Total: <b>" + KMG(data.sdcard_root_total,'M') + "</b>" + web.status.1.content.7.line.4=ProgressBar(data.sdcard_root_used,data.sdcard_root_total,60,80) + +-web.statistics.1.content.3.name=Disks - boot +-web.statistics.1.content.3.graph.1=sdcard_boot_total +-web.statistics.1.content.3.graph.2=sdcard_boot_used +-web.statistics.1.content.3.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB) +-web.statistics.1.content.3.ds_graph_options.sdcard_boot_total.color="#FF7777" +-web.statistics.1.content.3.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB) +-web.statistics.1.content.3.ds_graph_options.sdcard_boot_used.lines={ fill: true } +-web.statistics.1.content.3.ds_graph_options.sdcard_boot_used.color="#7777FF" +- +-web.statistics.1.content.4.name=Disks - root +-web.statistics.1.content.4.graph.1=sdcard_root_total +-web.statistics.1.content.4.graph.2=sdcard_root_used +-web.statistics.1.content.4.ds_graph_options.sdcard_root_total.label=Size of / (MB) +-web.statistics.1.content.4.ds_graph_options.sdcard_root_total.color="#FF7777" +-web.statistics.1.content.4.ds_graph_options.sdcard_root_used.label=Used on / (MB) +-web.statistics.1.content.4.ds_graph_options.sdcard_root_used.lines={ fill: true } +-web.statistics.1.content.4.ds_graph_options.sdcard_root_used.color="#7777FF" ++web.statistics.1.content.4.name=Disks - boot ++web.statistics.1.content.4.graph.1=sdcard_boot_total ++web.statistics.1.content.4.graph.2=sdcard_boot_used ++web.statistics.1.content.4.ds_graph_options.sdcard_boot_total.label=Size of /boot (MB) ++web.statistics.1.content.4.ds_graph_options.sdcard_boot_total.color="#FF7777" ++web.statistics.1.content.4.ds_graph_options.sdcard_boot_used.label=Used on /boot (MB) ++web.statistics.1.content.4.ds_graph_options.sdcard_boot_used.lines={ fill: true } ++web.statistics.1.content.4.ds_graph_options.sdcard_boot_used.color="#7777FF" ++ ++web.statistics.1.content.5.name=Disks - root ++web.statistics.1.content.5.graph.1=sdcard_root_total ++web.statistics.1.content.5.graph.2=sdcard_root_used ++web.statistics.1.content.5.ds_graph_options.sdcard_root_total.label=Size of / (MB) ++web.statistics.1.content.5.ds_graph_options.sdcard_root_total.color="#FF7777" ++web.statistics.1.content.5.ds_graph_options.sdcard_root_used.label=Used on / (MB) ++web.statistics.1.content.5.ds_graph_options.sdcard_root_used.lines={ fill: true } ++web.statistics.1.content.5.ds_graph_options.sdcard_root_used.color="#7777FF" diff --git a/www-apps/rpi-monitor/files/swap.conf-2.10.patch b/www-apps/rpi-monitor/files/swap.conf-2.10.patch new file mode 100644 index 00000000..bb3d0d93 --- /dev/null +++ b/www-apps/rpi-monitor/files/swap.conf-2.10.patch @@ -0,0 +1,52 @@ +--- rpimonitor/template/swap.conf.dist 2015-03-14 15:22:33.139612000 +0000 ++++ rpimonitor/template/swap.conf 2015-03-14 15:25:01.529612000 +0000 +@@ -5,27 +5,35 @@ + # - swap total - yes - yes + # - swap used - yes - yes + ######################################################################## +-static.6.name=swap_total +-static.6.source=/proc/meminfo +-static.6.regexp=SwapTotal:\s+(\d+) +-static.6.postprocess=$1/1024 ++ ++dynamic.7.name=swap_total ++dynamic.7.source=/proc/meminfo ++dynamic.7.regexp=SwapTotal:\s+(\d+) ++dynamic.7.postprocess=$1/1024 ++dynamic.7.rrd=GAUGE + + dynamic.8.name=swap_used + dynamic.8.source=/proc/meminfo + dynamic.8.regexp=SwapFree:\s+(\d+) +-dynamic.8.postprocess=$this->{'static'}->{'swap_total'} - ($1/1024) ++dynamic.8.postprocess=$this->{'dynamic'}->{'swap_total'} - ($1/1024) + dynamic.8.rrd=GAUGE + ++dynamic.18.name=swappiness ++dynamic.18.source=/proc/sys/vm/swappiness ++dynamic.18.regexp=(.*) ++dynamic.18.postprocess= ++dynamic.18.rrd= ++ + web.status.1.content.6.name=Swap + web.status.1.content.6.icon=swap.png +-web.status.1.content.6.line.1="Used: <b>"+KMG(data.swap_used,'M')+"</b> (<b>"+Percent(data.swap_used,data.swap_total,'M')+"</b>) Free: <b>"+KMG(data.swap_total-data.swap_used,'M')+ "</b> Total: <b>"+ KMG(data.swap_total,'M') + "</b>" ++web.status.1.content.6.line.1="Used: <b>" + KMG(data.swap_used,'M') + "</b> (<b>" + Percent(data.swap_used,data.swap_total,'M') + "</b>) Free: <b>" + KMG(data.swap_total-data.swap_used,'M') + "</b> Total: <b>" + KMG(data.swap_total,'M') + "</b> Swappiness: <b>" + data.swappiness + "</b>" + web.status.1.content.6.line.2=ProgressBar(data.swap_used,data.swap_total) + +-web.statistics.1.content.5.name=Swap +-web.statistics.1.content.5.graph.1=swap_total +-web.statistics.1.content.5.graph.2=swap_used +-web.statistics.1.content.5.ds_graph_options.swap_total.label=Swap size (MB) +-web.statistics.1.content.5.ds_graph_options.swap_total.color="#FF7777" +-web.statistics.1.content.5.ds_graph_options.swap_used.label=Swap used (MB) +-web.statistics.1.content.5.ds_graph_options.swap_used.lines={ fill: true } +-web.statistics.1.content.5.ds_graph_options.swap_used.color="#7777FF" ++web.statistics.1.content.6.name=Swap ++web.statistics.1.content.6.graph.1=swap_total ++web.statistics.1.content.6.graph.2=swap_used ++web.statistics.1.content.6.ds_graph_options.swap_total.label=Swap size (MB) ++web.statistics.1.content.6.ds_graph_options.swap_total.color="#FF7777" ++web.statistics.1.content.6.ds_graph_options.swap_used.label=Swap used (MB) ++web.statistics.1.content.6.ds_graph_options.swap_used.lines={ fill: true } ++web.statistics.1.content.6.ds_graph_options.swap_used.color="#7777FF" diff --git a/www-apps/rpi-monitor/files/temperature.conf-2.10.patch b/www-apps/rpi-monitor/files/temperature.conf-2.10.patch new file mode 100644 index 00000000..14442a70 --- /dev/null +++ b/www-apps/rpi-monitor/files/temperature.conf-2.10.patch @@ -0,0 +1,33 @@ +--- rpimonitor/template/temperature.conf.dist 2015-03-14 15:10:31.249612000 +0000 ++++ rpimonitor/template/temperature.conf 2015-03-14 15:13:36.239612000 +0000 +@@ -4,18 +4,19 @@ + # Information Status Statistics + # - cpu temperature - yes - yes + ######################################################################## +-dynamic.12.name=soc_temp +-dynamic.12.source=/sys/devices/virtual/thermal/thermal_zone0/temp +-dynamic.12.regexp=(.*) +-dynamic.12.postprocess=$1/1000 +-dynamic.12.rrd=GAUGE ++ ++dynamic.16.name=soc_temp ++dynamic.16.source=/sys/devices/virtual/thermal/thermal_zone0/temp ++dynamic.16.regexp=(.*) ++dynamic.16.postprocess=($1/10)/100 ++dynamic.16.rrd=GAUGE + + web.status.1.content.4.name=Temperature + web.status.1.content.4.icon=cpu_temp.png +-#web.status.1.content.4.line.1="CPU Temperature: <b>"+data.soc_temp+"°C</b>" +-#web.status.1.content.4.line.1=JustGageBar("CPU Temperature", data.soc_temp+"°C", 40, data.soc_temp, 80, 100, 80) +-web.status.1.content.4.line.1=JustGageBar("Temperature", "°C", 40, data.soc_temp, 80, 100, 80) ++#web.status.1.content.4.line.1="CPU Temperature: <b>" + data.soc_temp + "°C</b>" ++web.status.1.content.4.line.1=JustGageBar("CPU Temperature", data.soc_temp + "°C", 20, data.soc_temp, 80, 100, 80) ++#web.status.1.content.4.line.1=JustGageBar("Temperature", "°C", 20, data.soc_temp, 80, 100, 80) + +-web.statistics.1.content.8.name=Temperature +-web.statistics.1.content.8.graph.1=soc_temp +-web.statistics.1.content.8.ds_graph_options.soc_temp.label=Core temperature (°C) ++web.statistics.1.content.9.name=Temperature ++web.statistics.1.content.9.graph.1=soc_temp ++web.statistics.1.content.9.ds_graph_options.soc_temp.label=Core temperature (°C) diff --git a/www-apps/rpi-monitor/files/uptime.conf-2.10.patch b/www-apps/rpi-monitor/files/uptime.conf-2.10.patch new file mode 100644 index 00000000..f197eb69 --- /dev/null +++ b/www-apps/rpi-monitor/files/uptime.conf-2.10.patch @@ -0,0 +1,26 @@ +--- rpimonitor/template/uptime.conf.dist 2015-03-14 14:54:39.439612000 +0000 ++++ rpimonitor/template/uptime.conf 2015-03-14 15:03:41.339612000 +0000 +@@ -4,6 +4,7 @@ + # Information Status Statistics + # - uptime - yes - yes + ######################################################################## ++# + dynamic.1.name=uptime + dynamic.1.source=/proc/uptime + dynamic.1.regexp=(^\S+) +@@ -12,10 +13,10 @@ + + web.status.1.content.2.name=Uptime + web.status.1.content.2.icon=uptime.png +-web.status.1.content.2.line.1='Raspberry Pi time: <b>' + Clock( data.localtime) + "</b>" ++web.status.1.content.2.line.1='Raspberry Pi time: <b>' + Clock(data.localtime) + "</b>" + web.status.1.content.2.line.2="Uptime: " + Uptime(data.uptime) + +-web.statistics.1.content.7.name=Uptime +-web.statistics.1.content.7.graph.1=uptime +-web.statistics.1.content.7.graph_options.yaxis={ min:0, tickFormatter: function (v) { if (v > 86400) return (Math.round(v*10/60/60/24)/10) + " d" ; if (v > 3600) return (Math.round(v*10/60/60)/10) + " h" ; else return v + " s" }, } +-web.statistics.1.content.7.ds_graph_options.uptime.label=Uptime (s/h/d) ++web.statistics.1.content.8.name=Uptime ++web.statistics.1.content.8.graph.1=uptime ++web.statistics.1.content.8.graph_options.yaxis={ min:0, tickFormatter: function (v) { if (v > 86400) return (Math.round(v*10/60/60/24)/10) + " days" ; if (v > 3600) return (Math.round(v*10/60/60)/10) + " hours" ; else return v + " seconds" }, } ++web.statistics.1.content.8.ds_graph_options.uptime.label=Uptime diff --git a/www-apps/rpi-monitor/files/version.conf-2.10.patch b/www-apps/rpi-monitor/files/version.conf-2.10.patch new file mode 100644 index 00000000..a8e423f8 --- /dev/null +++ b/www-apps/rpi-monitor/files/version.conf-2.10.patch @@ -0,0 +1,78 @@ +--- rpimonitor/template/version.conf.dist 2015-03-14 14:52:23.219612000 +0000 ++++ rpimonitor/template/version.conf 2015-03-14 15:48:29.459612000 +0000 +@@ -9,6 +9,7 @@ + # - num of pkg upgradable - yes - no + # - list of pkg upgradable - yes - no + ######################################################################## ++ + static.1.name=distribution + static.1.source=/etc/os-release + static.1.regexp=PRETTY_NAME.\"(.*)\" +@@ -20,8 +21,10 @@ + static.2.postprocess= + + static.3.name=firmware +-static.3.source=/proc/version +-static.3.regexp=(#\d+) ++#static.3.source=/proc/version ++#static.3.regexp=(#\d+) ++static.3.source=/usr/bin/strings /boot/start_cd.elf ++static.3.regexp=^VC_BUILD_ID_VERSION:\s+(\S+) + static.3.postprocess= + + static.4.name=processor +@@ -29,22 +32,39 @@ + static.4.regexp=(?:Processor|model name)\s+: (.*) + static.4.postprocess= + +-dynamic.1.name=upgrade +-dynamic.1.source=/var/lib/rpimonitor/updatestatus.txt +-dynamic.1.regexp=(\d+ upgradable\(s\)|.* .*) +-dynamic.1.postprocess= +-dynamic.1.rrd= +- +-dynamic.2.name=packages +-dynamic.2.source=/var/lib/rpimonitor/updatestatus.txt +-dynamic.2.regexp=^\s+(.*)\s+\d+ upgradable +-dynamic.2.postprocess= +-dynamic.2.rrd= ++static.5.name=hardware ++static.5.source=/proc/cpuinfo ++static.5.regexp=Hardware\s+: (.*) ++static.5.postprocess= ++ ++static.6.name=revision ++static.6.source=/proc/cpuinfo ++static.6.regexp=Revision\s+: 0*(.*) ++static.6.postprocess= ++ ++static.7.name=serial ++static.7.source=/proc/cpuinfo ++static.7.regexp=Serial\s+: (.*) ++static.7.postprocess= ++ ++#dynamic.1.name=upgrade ++#dynamic.1.source=/var/lib/rpimonitor/updatestatus.txt ++#dynamic.1.regexp=(\d+ upgradable\(s\)|.* .*) ++#dynamic.1.postprocess= ++#dynamic.1.rrd= ++ ++#dynamic.2.name=packages ++#dynamic.2.source=/var/lib/rpimonitor/updatestatus.txt ++#dynamic.2.regexp=^\s+(.*)\s+\d+ upgradable ++#dynamic.2.postprocess= ++#dynamic.2.rrd= + + web.status.1.content.1.name=Version + web.status.1.content.1.icon=version.png + web.status.1.content.1.line.1='Processor: <b>' + data.processor + '</b>' +-web.status.1.content.1.line.2='Distribution: <b>'+ data.distribution + '</b>' +-web.status.1.content.1.line.3='Kernel version: <b>' + data.kernel_version + '</b>' +-web.status.1.content.1.line.4='Firmware: <b>' + data.firmware + '</b>' +-web.status.1.content.1.line.5='Package(s): <b>' + data.upgrade + '</b>' + ShowInfo('packages','Package(s) upgradable(s)',data.packages) ++web.status.1.content.1.line.2='Hardware: <b>' + data.hardware + '</b> revision <b>' + data.revision + '</b>' ++web.status.1.content.1.line.3='Serial number: <b>' + data.serial + '</b>' ++web.status.1.content.1.line.4='Distribution: <b>' + data.distribution + '</b>' ++web.status.1.content.1.line.5='Kernel version: <b>' + data.kernel_version + '</b>' ++web.status.1.content.1.line.6='Firmware: <b>' + data.firmware + '</b>' ++#web.status.1.content.1.line.7='Package(s): <b>' + data.upgrade + '</b>' + ShowInfo('packages','Package(s) upgradable(s)',data.packages) diff --git a/www-apps/rpi-monitor/rpi-monitor-2.10.ebuild b/www-apps/rpi-monitor/rpi-monitor-2.10.ebuild new file mode 100644 index 00000000..32a0f432 --- /dev/null +++ b/www-apps/rpi-monitor/rpi-monitor-2.10.ebuild @@ -0,0 +1,185 @@ +# Copyright (c) 2013 Stuart Shelton <stuart@shelton.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" + +inherit eutils + +DESCRIPTION="RPi-Monitor - always keep an eye on your Raspberry Pi" +HOMEPAGE="http://rpi-experiences.blogspot.fr" +SRC_URI="https://github.com/XavierBerger/RPi-Monitor/archive/v${PV}.zip -> ${P}.zip + https://github.com/XavierBerger/RPi-Monitor-deb/archive/v${PV}.zip -> ${PN}-deb-${PV}.zip" +RESTRICT="nomirror" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="-* arm" +IUSE="httpd tools" + +DEPEND="app-admin/webapp-config" +RDEPEND=" + httpd? ( + virtual/httpd-cgi + ) + !httpd? ( + dev-perl/HTTP-Daemon + ) + net-analyzer/rrdtool[perl] + || ( ( virtual/perl-JSON-PP dev-perl/JSON-Any ) dev-perl/JSON ) + dev-perl/File-Which + dev-perl/IPC-ShareLite" + +if use httpd; then + inherit webapp + + need_httpd_cgi +fi + +S="${WORKDIR}/RPi-Monitor-${PV}" + +src_prepare() { + cp rpimonitor/template/raspbian.conf rpimonitor/template/gentoo.conf + local patch + for patch in "${FILESDIR}"/*-${PV}.patch; do + epatch "${patch}" || die "epatch failed" + done + + # Fix version string... + sed -i \ + -e "s|<b>Version</b>: {DEVELOPMENT} |<b>Version</b>: ${PV} |" \ + rpimonitor/web/js/rpimonitor.js || die "Version correction failed" + + sed -i \ + -e 's|<code>/etc/rpimonitor/data.conf</code>|<code>/etc/rpimonitor/data.conf</code>|' \ + rpimonitor/web/addons/about/about.html || die "path correction failed" + + cp "${S}"/../RPi-Monitor-deb-"${PV}"/conf2man.pl . + cp "${S}"/../RPi-Monitor-deb-"${PV}"/help2man.pl . + chmod 755 conf2man.pl help2man.pl + + [[ -x ./help2man.pl && -x conf2man.pl ]] \ + || die "Portage temporary directory must not be mounted 'noexec'" + + cat rpimonitor/daemon.conf rpimonitor/template/gentoo.conf > rpimonitord.conf + + ./help2man.pl rpimonitor/rpimonitord "${PV}" > rpimonitord.1 + ./conf2man.pl rpimonitord.conf "${PV}" > rpimonitord.conf.5 +} + +src_install() { + local file + + use httpd && webapp_src_preinst + + doman rpimonitord.1 rpimonitord.conf.5 + + dodoc README.md + newdoc tools/reverseproxy nginx.conf.example + dodoc rpimonitor/template/example.*.conf + for file in printer storage services wlan dht11; do + dodoc rpimonitor/template/"${file}".conf + done + + dosbin rpimonitor/rpimonitord + if use tools; then + exeinto /usr/share/"${PN}"/tools + doexe tools/{addnginxuser.sh,make_ca.sh,make_cert.sh,netTraffic.sh,openssl.cnf} + fi + + newconfd "${FILESDIR}"/rpimonitor.confd rpimonitor + newinitd "${FILESDIR}"/rpimonitor.initd rpimonitor + dodir /etc/rpimonitord.conf.d + insinto /etc/rpimonitord.conf.d + newins rpimonitor/template/gentoo.conf data.conf + for file in version uptime cpu temperature memory swap sdcard network; do + doins rpimonitor/template/"${file}".conf + done + + if use httpd; then + # Try to determine the real root directory... + if [[ -n "${vhost_root}" || -r /etc/vhosts/webapp-config ]]; then + if ! [[ -n "${vhost_root}" && -n "${vhost_htdocs_insecure}" ]]; then + # Do this twice, so that variables defined in terms of other + # values are correctly initialised... + source /etc/vhosts/webapp-config + source /etc/vhosts/webapp-config + fi + INSTROOT="${vhost_root}/${vhost_htdocs_insecure}" + else + INSTROOT="${EROOT}/var/www/localhost/htdocs" + fi + + insinto "${MY_HTDOCSDIR}" + doins -r rpimonitor/web/* + dodir "${MY_HTDOCSDIR}"/custom/net_traffic + dodir "${MY_HTDOCSDIR}"/stat + + webapp_serverowned "${MY_HTDOCSDIR}"/custom + webapp_serverowned "${MY_HTDOCSDIR}"/custom/net_traffic + webapp_serverowned "${MY_HTDOCSDIR}"/stat + else + INSTROOT="${EROOT}/usr/share" + + insinto /usr/share/rpi-monitor + doins -r rpimonitor/web/* + diropts -m 0775 -o nobody -g nogroup + + dodir /var/lib/rpi-monitor/custom/net_traffic + dodir /var/lib/rpi-monitor/stat + + dosym ../../../var/lib/rpi-monitor/stat /usr/share/rpi-monitor/stat + dosym ../../../var/lib/rpi-monitor/custom /usr/share/rpi-monitor/custom + fi + + sed -i \ + -e "s|^#daemon.webroot=/usr/share/rpimonitor/web$|daemon.webroot=${INSTROOT/\/\///}/rpi-monitor|" \ + -e "s|^#daemon.datastore=/var/lib/rpimonitor$|daemon.datastore=/var/lib/rpi-monitor|" \ + -e "s|^#daemon.user=pi$|daemon.user=nobody|" \ + -e "s|^#daemon.group=pi$|daemon.group=nogroup|" \ + rpimonitor/daemon.conf + insinto /etc/ + newins rpimonitor/daemon.conf rpimonitord.conf + + use httpd && webapp_src_install +} + +pkg_postinst() { + einfo "Edit the file /etc/rpimonitord.conf.d/data.conf to configure RPi-Monitor" + echo + ewarn "If graphs display incorrect data or values are shown as 'NaN' in the" + ewarn "web-interface, especially after configuration changes, try stopping" + ewarn "RPi-Monitor and deleting the affected .rrd files from" + ewarn "/var/lib/rpi-monitor before restarting RPi-Monitor - which should clear" + ewarn "any problems caused by changes in format." + echo + ewarn "In release 2.10, the single configuration file 'default.conf' has been" + ewarn "split up into 'data.conf' and multiple sub-configuration files. Please" + ewarn "migrate your 'default.conf' to the new file structure, after which it can" + ewarn "be deleted." + ewarn "Please note that configuration files are simply concatenated, and so care" + ewarn "must be taken not to accidentally re-use Object ID numbers, which are now" + ewarn "split across multiple files." + echo + einfo "If network data collected by earlier versions of ${PN} cause anomalous peaks" + einfo "to appear on network graphs, this can be resolved by adjusting the network" + einfo "RRD databases:" + echo + if use httpd; then + # Try to determine the real root directory... + if [[ -n "${vhost_root}" || -r /etc/vhosts/webapp-config ]]; then + if ! [[ -n "${vhost_root}" && -n "${vhost_htdocs_insecure}" ]]; then + # Do this twice, so that variables defined in terms of other + # values are correctly initialised... + source /etc/vhosts/webapp-config + source /etc/vhosts/webapp-config + fi + INSTROOT="${vhost_root}/${vhost_htdocs_insecure}" + else + INSTROOT="${EROOT}/var/www/localhost/htdocs" + fi + else + INSTROOT="${EROOT}/var/lib/rpi-monitor" + fi + einfo "rrdtool tune ${INSTROOT//\/\///}/stat/net_received.rrd -a net_received:0" + einfo "rrdtool tune ${INSTROOT//\/\///}/stat/net_send.rrd -i net_send:0" +} |