Skip to content

Commit

Permalink
Merge branch 'develop' for v3.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrobot47 committed Jan 13, 2023
2 parents 0c3e6aa + 0ae2146 commit d910ceb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions migrations/db/20210728160510_site-command_add_daemon_json.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public function up() {

$existin_config['default-address-pools'] = json_decode( '[{"base":"10.0.0.0/8","size":24}]', true );
file_put_contents( '/etc/docker/daemon.json', json_encode( $existin_config ) );

EE::launch( 'command -v systemctl && systemctl restart docker || service docker restart' );
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ public function up() {

file_put_contents( '/etc/docker/daemon.json', json_encode( $existin_config ) );

EE::launch( 'command -v systemctl && systemctl restart docker || service docker restart' );
$return_code = EE::launch( 'command -v systemctl && systemctl restart docker || service docker restart' );
if ( $return_code !== 0 ) {
EE::launch( 'command -v service && service docker restart || systemctl restart docker' );
}
}
}

Expand Down

0 comments on commit d910ceb

Please sign in to comment.