Podman OpenRC Restart Policy Manager
This OpenRC init script manages the automatic startup and shutdown of Podman containers with the `restart-policy=always` on system boot or shutdown
About
Sourced from arikw/podman-openrc-restart-policy-manager README
This OpenRC init script manages the startup and shutdown of Podman containers based on the restart-policy=always. It ensures that the containers are started automatically on system boot and stopped on system shutdown, and that they only start once networking is available.
Features
- Automatically starts Podman containers with
restart-policy=alwayson system boot. - Stops containers on system shutdown.
- Ensures containers start only after the network is up.
- Configurable for different users and Podman setups.
Installation
Clone the repository:
git clone https://github.com/yourusername/podman-openrc-restart-policy-manager.git cd podman-openrc-restart-policy-managerCopy the script to the OpenRC init.d directory:
sudo cp podman-container.sh /etc/init.d/podman-containerMake the script executable:
sudo chmod +x /etc/init.d/podman-containerEnable the service to start on boot:
sudo rc-update add podman-container defaultStart the service:
sudo service podman-container start
Configuration
The script uses the following configurable variables:
PODMAN: The path to the Podman executable.
Default:/usr/bin/podman
To override, set thePODMANenvironment variable:export PODMAN="/usr/local/bin/podman"CONTAINER_USER: The user under which the Podman containers should run.
Default:root
To override, set theCONTAINER_USERenvironment variable:export CONTAINER_USER="youruser"
These variables can be set globally or within the script itself to customize the behavior based on your environment.
Example configuration:
To configure the script for a custom Podman path and user, create or modify the /etc/env.d/99-podman file:
PODMAN="/usr/local/bin/podman"
CONTAINER_USER="podmanuser"
Troubleshooting
- If you encounter issues with containers not starting, check the logs with:
sudo tail -f /var/log/messages - Ensure that Podman is installed and the binary path is correct.
More projects
See all →2020
Extension Page Context Runner
Run functions in page context directly from a browser extension content script
27
2020
Outlook Duplicated Items Remover
A VBA script that finds and moves duplicated items in selected outlook folders
21
2023
RX Input Layout Switcher
Alt+Shift keyboard layout switcher GNOME Shell Extension
16 9.6K
2022
Express Response Hooks
Extends Express.js with response hooks
4 149.3K 5.5K/mo
2021
Kids Keyboard Game
Kids Keyboard Game
3
2026
RX Browser Bridge
Drive your own already-open browser from your AI coding agent (any MCP client) via a self-hosted relay + MV3 extension. Tools: screenshot (+full-page), navigate, click, fill, query, new_tab, evaluate (arbitrary JS, even on CSP-locked sites via userScripts). Toolbar activity flash + sqlite audit log for visibility.
2