summaryrefslogtreecommitdiff
path: root/app-containers/podman/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-07 07:06:38 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-07 07:06:38 +0000
commita03bc69159ecc073f051ca2079848553a8e34664 (patch)
treeee5424e043dfb1fe51f12594640edff5846b796e /app-containers/podman/files
parent905e7d07da40378586e71ece65bd962b0b00c578 (diff)
gentoo auto-resync : 07:03:2024 - 07:06:38
Diffstat (limited to 'app-containers/podman/files')
-rw-r--r--app-containers/podman/files/podman-5.0.0_rc4.confd11
-rw-r--r--app-containers/podman/files/podman-5.0.0_rc4.initd21
-rw-r--r--app-containers/podman/files/podman-auto-update-5.0.0_rc4.cron7
-rw-r--r--app-containers/podman/files/podman-restart-5.0.0_rc4.confd9
-rw-r--r--app-containers/podman/files/podman-restart-5.0.0_rc4.initd22
5 files changed, 70 insertions, 0 deletions
diff --git a/app-containers/podman/files/podman-5.0.0_rc4.confd b/app-containers/podman/files/podman-5.0.0_rc4.confd
new file mode 100644
index 000000000000..eafaee7fddef
--- /dev/null
+++ b/app-containers/podman/files/podman-5.0.0_rc4.confd
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/podman
+
+# Sets the API service daemon log level
+# valid levels: debug, info, warn, error, fatal or panic
+#LOG_LEVEL="error"
+
+# Sets the API service daemon socket
+#SOCKET="unix:///run/podman/podman.sock"
+
+# Configure the user[:group] the API service daemon will run as
+#RUN_AS_USER="root:root"
diff --git a/app-containers/podman/files/podman-5.0.0_rc4.initd b/app-containers/podman/files/podman-5.0.0_rc4.initd
new file mode 100644
index 000000000000..53026a54176d
--- /dev/null
+++ b/app-containers/podman/files/podman-5.0.0_rc4.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 2015-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Podman API Service"
+
+LOG_PATH="/var/log/${RC_SVCNAME}"
+output_log="${LOG_PATH}/${RC_SVCNAME}.log"
+error_log="${LOG_PATH}/${RC_SVCNAME}.log"
+RUN_PATH="/run/${RC_SVCNAME}"
+pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
+
+command_user="${RUN_AS_USER:=root:root}"
+command="/usr/bin/podman"
+command_args="--log-level ${LOG_LEVEL:-error} system service --time 0 ${SOCKET:-unix://${RUN_PATH}/${RC_SVCNAME}.sock}"
+command_background="true"
+
+start() {
+ checkpath -o "${RUN_AS_USER}" -d "${RUN_PATH}" "${LOG_PATH}"
+ default_start
+}
diff --git a/app-containers/podman/files/podman-auto-update-5.0.0_rc4.cron b/app-containers/podman/files/podman-auto-update-5.0.0_rc4.cron
new file mode 100644
index 000000000000..d0a0fb54b106
--- /dev/null
+++ b/app-containers/podman/files/podman-auto-update-5.0.0_rc4.cron
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+
+# mimicking behaviour of podman-auto-update.service
+if [ -x /usr/bin/podman ]; then
+ /usr/bin/podman auto-update && /usr/bin/podman image prune -f
+fi
diff --git a/app-containers/podman/files/podman-restart-5.0.0_rc4.confd b/app-containers/podman/files/podman-restart-5.0.0_rc4.confd
new file mode 100644
index 000000000000..4d63848cb16f
--- /dev/null
+++ b/app-containers/podman/files/podman-restart-5.0.0_rc4.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/podman-restart
+
+# Sets the podman log level
+# valid levels: debug, info, warn, error, fatal or panic
+#LOG_LEVEL="info"
+
+# Configure the user[:group] the podman will run as
+# Can be useful to manage rootful or rootless containers
+#RUN_AS_USER="root:root"
diff --git a/app-containers/podman/files/podman-restart-5.0.0_rc4.initd b/app-containers/podman/files/podman-restart-5.0.0_rc4.initd
new file mode 100644
index 000000000000..d02bd64c6279
--- /dev/null
+++ b/app-containers/podman/files/podman-restart-5.0.0_rc4.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2015-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+description="Start all containers with restart-policy set to always"
+
+command_user="${RUN_AS_USER:=root:root}"
+command="/usr/bin/podman"
+command_args="--log-level ${LOG_LEVEL:=info} start --all --filter restart-policy=always"
+
+depend() {
+ after net
+}
+
+stop() {
+ ebegin "Stopping all containers with restart-policy set to always"
+ ${command} \
+ --log-level ${LOG_LEVEL} \
+ stop \
+ $(${command} container ls --filter restart-policy=always -q)
+ eend $? "Failed to stop containers with restart-policy set to always"
+}