Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #100 from huankong233/dev
Browse files Browse the repository at this point in the history
[*] 修复 `docker` 更新错误的文件复制
  • Loading branch information
huankong233 authored May 23, 2024
2 parents 5d0ab64 + cda63d6 commit 76c53e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/Console/Commands/CheckAppStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ public function handle(): void
$bak_path = "/var/www/bak";

$www_db_file = $www_path . "/database/database.sqlite";
$bak_db_file = $bak_path . "/database/database.sqlite";
$bak_db_file = $bak_path . "/database.sqlite";

$www_env_file = $www_path . "/.env";
$bak_env_file = $bak_path . "/.env";

$this->info("开始备份数据库和配置文件");
if (!File::exists($bak_path)) File::makeDirectory($bak_path);
if (File::exists($www_db_file)) File::copy($bak_db_file, $www_db_file);
if (File::exists($www_env_file)) File::copy($bak_env_file, $www_env_file);
if (File::exists($www_db_file)) File::copy($www_db_file, $bak_db_file);
if (File::exists($www_env_file)) File::copy($www_env_file, $bak_env_file);
$this->info("完成备份数据库和配置文件");

$this->info("开始导入容器版本源码");
Expand All @@ -93,7 +93,7 @@ public function handle(): void
$this->info("完成导入容器版本源码");

$this->info("开始导入sqlite数据库");
if (File::exists($bak_db_file)) File::copy($www_db_file, $bak_db_file);
if (File::exists($bak_db_file)) File::copy($bak_db_file, $www_db_file);
$this->info("完成导入sqlite数据库");

$this->info("开始导入配置文件");
Expand Down

0 comments on commit 76c53e3

Please sign in to comment.