@@ -5,24 +5,42 @@ PHP script to notify an admin by email of how much space allocated by web sites
55
66Download and copy files to your shared hosting.
77
8+ ## Config
9+ Edit ` config.json ` before use.
10+ Config fields are:
11+
12+ ```
13+ rootDir - absoulte path to your account on web-hosting,
14+ totalDiskQuotaMb - total accoun space limit in megabytes,
15+ maxSiteCount - sites count used to calculate per site space limit, typycally allowed by tariff,
16+ reportInfo - contains report config,
17+ mailFrom - e-mail addres to use as from header (e.g. status@example.org),
18+ name - title for the report,
19+ type - (html|plain) type of generated report,
20+ sites - (array) of site info, with structure:
21+ domain - domain name,
22+ path - path to site dir from `rootDir`
23+ ```
24+
25+
826### Mail report every moth
9- Allow to execute ` du-notifier .php` , e.g. ` chmod +x du-notifier .php ` to allow run from cron.
10- Configure cron task to run ` /path-to-scripts/du-notifier .php -m mailme@example.org ` for example once a month.
27+ Allow to execute ` dunotifier .php` , e.g. ` chmod +x dunotifier .php ` to allow run from cron.
28+ Configure cron task to run ` /path-to-scripts/dunotifier .php -m mailme@example.org ` for example once a month.
1129It will send you a letter with a report once a month.
1230
1331### Instant report
14- Open your web site at http://site.com/path-to-scripts/du-notifier .php to see the html report.
32+ Open your web site at http://site.com/path-to-scripts/dunotifier .php to see the html report.
1533Set password for this folder to protect it from undesired access.
1634
1735## Email Report Example
1836
1937The letter in Gmail interface.
2038
21- ![ Du-notifier E-mail report] ( du-notifier-email-report.png )
39+ ![ DuNotifier E-mail report] ( du-notifier-email-report.png )
2240
2341## Online HTML Report Example
2442
2543See below.
2644
27- ![ Du-notifier HTML report] ( du-notifier-html-report.png )
45+ ![ DuNotifier HTML report] ( du-notifier-html-report.png )
2846
0 commit comments