mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
set permissions on config file initiation
This commit is contained in:
parent
2226eaf243
commit
fdb119587e
1 changed files with 6 additions and 4 deletions
|
|
@ -18,10 +18,12 @@ if (!in_array($_SERVER['PHP_ENV'], ['default', 'mirror', 'dev', 'test', 'prod'])
|
||||||
// Generate configuration file if not exists
|
// Generate configuration file if not exists
|
||||||
if (!file_exists(__DIR__ . '/../../env.' . $_SERVER['PHP_ENV'] . '.php'))
|
if (!file_exists(__DIR__ . '/../../env.' . $_SERVER['PHP_ENV'] . '.php'))
|
||||||
{
|
{
|
||||||
copy(
|
if (copy(__DIR__ . '/../../example/environment/env.example.php', __DIR__ . '/env.' . $_SERVER['PHP_ENV'] . '.php'))
|
||||||
__DIR__ . '/../../example/environment/env.example.php',
|
{
|
||||||
__DIR__ . '/env.' . $_SERVER['PHP_ENV'] . '.php'
|
chmod(__DIR__ . '/env.' . $_SERVER['PHP_ENV'] . '.php', 0770);
|
||||||
);
|
}
|
||||||
|
|
||||||
|
else exit (_('Could not init configuration file. Please check permissions.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load environment configuration
|
// Load environment configuration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue