mirror of https://github.com/itflow-org/itflow
Ensure All commands are executed within the update and setup scripts directory
This commit is contained in:
parent
2cf2545f32
commit
c4870e49cf
|
|
@ -5,6 +5,9 @@
|
||||||
//php setup_cli.php --help
|
//php setup_cli.php --help
|
||||||
//php setup_cli.php --host=localhost --username=itflow --password=secret --database=itflow --base-url=example.com/itflow --locale=en_US --timezone=UTC --currency=USD --company-name="My Company" --country="United States" --user-name="John Doe" --user-email="john@example.com" --user-password="admin123" --non-interactive
|
//php setup_cli.php --host=localhost --username=itflow --password=secret --database=itflow --base-url=example.com/itflow --locale=en_US --timezone=UTC --currency=USD --company-name="My Company" --country="United States" --user-name="John Doe" --user-email="john@example.com" --user-password="admin123" --non-interactive
|
||||||
|
|
||||||
|
// Change to the directory of this script so that all shell commands run here
|
||||||
|
chdir(__DIR__);
|
||||||
|
|
||||||
// Ensure we're running from command line
|
// Ensure we're running from command line
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
die("This setup script must be run from the command line.\n");
|
die("This setup script must be run from the command line.\n");
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Change to the directory of this script so that all shell commands run here
|
||||||
|
chdir(__DIR__);
|
||||||
|
|
||||||
// Ensure script is run only from the CLI
|
// Ensure script is run only from the CLI
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
die("This script can only be run from the command line.\n");
|
die("This script can only be run from the command line.\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue