mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-08-10 15:29:46 +08:00
modified 进一步优化安装脚本
This commit is contained in:
parent
c2771ea95a
commit
df090273c9
@ -29,11 +29,11 @@ class Install extends Command {
|
|||||||
*/
|
*/
|
||||||
protected function execute(Input $input, Output $output) {
|
protected function execute(Input $input, Output $output) {
|
||||||
$tplPath = Env::get('app_path') . 'install' . DIRECTORY_SEPARATOR;
|
$tplPath = Env::get('app_path') . 'install' . DIRECTORY_SEPARATOR;
|
||||||
$lockFile = $tplPath . 'lock.php';
|
$lockFile = $tplPath . 'lock.ini';
|
||||||
|
|
||||||
if (file_exists($lockFile)) {
|
if (file_exists($lockFile)) {
|
||||||
$output->highlight("您已经安装过了,请勿重新安装!");
|
$output->highlight("您已经安装过了,请勿重新安装!");
|
||||||
$output->highlight("如有需要请删除application/install/lock.php文件再次尝试");
|
$output->highlight("如有需要请删除application/install/lock.ini文件再次尝试");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class IniAdminUser extends Migrator {
|
|||||||
|
|
||||||
$this->table('admin_user')->insert($data)->saveData();
|
$this->table('admin_user')->insert($data)->saveData();
|
||||||
|
|
||||||
$lockFile = Env::get('app_path') . 'install' . DIRECTORY_SEPARATOR . 'lock.php';
|
$lockFile = Env::get('app_path') . 'install' . DIRECTORY_SEPARATOR . 'lock.ini';
|
||||||
file_put_contents($lockFile, "username:root, password:{$pass}");
|
file_put_contents($lockFile, "username:root, password:{$pass}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user