Fassung 1.7.0: verlässliche Installation, übersichtliche Verwaltung und bedienbare Bewegung
This commit is contained in:
1 parent
b164c4edfe
commit
495b26896e
55 files changed
+1632
-423
No files matched your search
+8
-8
@@ -1,13 +1,13 @@
|
||||
<?php
|
||||
|
||||
// Only creates local state; never replaces an existing environment file.
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
use App\Ops\Environment;
|
||||
|
||||
$root = dirname(__DIR__);
|
||||
if (!is_dir($root.'/var')) {
|
||||
mkdir($root.'/var', 0775, true);
|
||||
}
|
||||
if (!file_exists($root.'/.env.local')) {
|
||||
file_put_contents($root.'/.env.local', 'APP_SECRET='.bin2hex(random_bytes(32)).PHP_EOL);
|
||||
echo "Created .env.local with a local secret.\n";
|
||||
} else {
|
||||
echo "Existing .env.local preserved.\n";
|
||||
mkdir($root.'/var', 0o775, true);
|
||||
}
|
||||
Environment::prepare($root);
|
||||
Environment::ensureSecret($root);
|
||||
echo ".env ist eingerichtet; bestehende Einstellungen und das Secret bleiben erhalten.\n";
|
||||
Reference in new issue
Block a user