This commit is contained in:
2021-04-19 14:55:44 +08:00
parent d6720f0e1e
commit 36ae199d49
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -48,8 +48,7 @@ class Shutdown extends Component
{ {
clearstatcache(storage()); clearstatcache(storage());
$output = shell_exec('[ -f /.dockerenv ] && echo yes || echo no'); $output = shell_exec('[ -f /.dockerenv ] && echo yes || echo no');
var_dump($output); if (trim($output) === 'yes') {
if ($output === 'yes') {
return; return;
} }
+1 -1
View File
@@ -244,7 +244,7 @@ class Snowflake
public static function isDcoker(): bool public static function isDcoker(): bool
{ {
exec('[ -f /.dockerenv ] && echo yes || echo no', $output, $cod); exec('[ -f /.dockerenv ] && echo yes || echo no', $output, $cod);
if ($cod === 0 && $output === 'yes') { if ($cod === 0 && trim($output) === 'yes') {
return true; return true;
} }
return false; return false;