aboutsummaryrefslogtreecommitdiffstats
path: root/community/podman/podman.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/podman/podman.initd')
-rw-r--r--community/podman/podman.initd19
1 files changed, 16 insertions, 3 deletions
diff --git a/community/podman/podman.initd b/community/podman/podman.initd
index d600b56d174..76586631023 100644
--- a/community/podman/podman.initd
+++ b/community/podman/podman.initd
@@ -5,11 +5,20 @@ name="Podman API service"
description="Listening service that answers API calls for Podman"
command=/usr/bin/podman
-command_args="system service $podman_opts $podman_uri"
-command_user="${podman_user:-root}"
+command_args="system service ${podman_opts:=--time 0} $podman_uri"
+command_user="${podman_user:=root}"
+
+extra_commands="start_containers"
+description_start_containers="Start containers with restart policy set to always"
depend() {
- need sysfs cgroups
+ need sysfs cgroups
+}
+
+start_containers() {
+ ebegin "Starting containers with restart policy set to always"
+ su "$podman_user" -s /bin/sh -c "$command start --all --filter restart-policy=always"
+ eend $?
}
start_pre() {
@@ -22,3 +31,7 @@ start_pre() {
modprobe fuse
fi
}
+
+start_post() {
+ start_containers
+}