-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SPDX-FileCopyrightText: © 2024 Jip-Hop and the Jailmakers <https://github.com/Jip-Hop/jailmaker> | ||
# | ||
# SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
from actions.start import start_jail | ||
from utils.dataset import get_all_jail_names, get_jail_config_path | ||
from utils.config_parser import parse_config_file | ||
|
||
|
||
def startup_jails(): | ||
start_failure = False | ||
for jail_name in get_all_jail_names(): | ||
config = parse_config_file(get_jail_config_path(jail_name)) | ||
if config and config.my_getboolean("startup"): | ||
if start_jail(jail_name) != 0: | ||
start_failure = True | ||
|
||
if start_failure: | ||
return 1 | ||
|
||
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters