diff options
| author | 2018-03-04 15:26:24 +0100 | |
|---|---|---|
| committer | 2018-03-04 15:26:24 +0100 | |
| commit | f0fd273199682881b805e968ca36df4ccdbfa7a1 (patch) | |
| tree | 0f87fcc515fb493193f9c58a9a0ed19f4caf07e8 /cli/prepare.php | |
| parent | 5ebeb9e3e5d46195a83211140c1d28d58be19b2a (diff) | |
| parent | a37b95f6779e6e2035f0efb72cf5144e7fad2ea3 (diff) | |
Merge pull request #1810 from FreshRSS/dev1.10.1
FreshRSS 1.10.1
Diffstat (limited to 'cli/prepare.php')
| -rwxr-xr-x | cli/prepare.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cli/prepare.php b/cli/prepare.php new file mode 100755 index 000000000..2db2da555 --- /dev/null +++ b/cli/prepare.php @@ -0,0 +1,37 @@ +#!/usr/bin/php +<?php +require(__DIR__ . '/_cli.php'); + +$dirs = array( + '/', + '/cache', + '/extensions-data', + '/favicons', + '/PubSubHubbub', + '/PubSubHubbub/feeds', + '/PubSubHubbub/keys', + '/tokens', + '/users', + '/users/_', +); + +$ok = true; + +foreach ($dirs as $dir) { + @mkdir(DATA_PATH . $dir, 0770, true); + $ok &= touch(DATA_PATH . $dir . '/index.html'); +} + +if (!is_file(DATA_PATH . '/config.php')) { + $ok &= touch(DATA_PATH . '/do-install.txt'); +} + +file_put_contents(DATA_PATH . '/.htaccess', +"Order Allow,Deny\n" . +"Deny from all\n" . +"Satisfy all\n" +); + +accessRights(); + +done($ok); |
