mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2025-12-26 23:17:47 -05:00
1. `include`, `include_once`, `require` and `require_once` are expressions not functions, parentheses are not necessary. 2. to move up the directory tree, it's better to use the `dirname` function instead of relying on `/..`.
37 lines
522 B
PHP
Executable File
37 lines
522 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
declare(strict_types=1);
|
|
require __DIR__ . '/_cli.php';
|
|
|
|
$dirs = [
|
|
'/',
|
|
'/cache',
|
|
'/extensions-data',
|
|
'/favicons',
|
|
'/fever',
|
|
'/PubSubHubbub',
|
|
'/PubSubHubbub/feeds',
|
|
'/PubSubHubbub/keys',
|
|
'/Retry-After',
|
|
'/tokens',
|
|
'/users',
|
|
'/users/_',
|
|
];
|
|
|
|
$ok = true;
|
|
|
|
foreach ($dirs as $dir) {
|
|
@mkdir(DATA_PATH . $dir, 0770, true);
|
|
$ok &= touch(DATA_PATH . $dir . '/index.html');
|
|
}
|
|
|
|
file_put_contents(DATA_PATH . '/.htaccess', <<<'EOF'
|
|
Require all denied
|
|
|
|
EOF
|
|
);
|
|
|
|
accessRights();
|
|
|
|
done((bool)$ok);
|