Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
a Systemd unit for my Raspberry Pi (podman powered)
[Unit]
Description=Revealjs slides, powered by GitHub Gist
Documentation=https://github.com/ryanj/gist-reveal
Requires=network.target
Wants=network-online.target
After=network-online.target
Before=shutdown.target multi-user.target
Conflicts=shutdown.target
[Install]
WantedBy=multi-user.target
[Service]
Environment="DEFAULT_GIST=f30fc4c4555da88b5bc57d4d436ce026"
Environment="GH_CLIENT_SECRET=YOUR_GH_CLIENT_SECRET"
Environment="GH_CLIENT_ID=YOUR_GH_CLIENT_ID"
Environment="IMG=ryanj/gist-reveal:latest"
Environment="CONTAINER_NAME=reveal"
Restart=always
ExecStartPre=-/usr/bin/podman rm --force ${CONTAINER_NAME}
ExecStart=/usr/bin/podman run -it --rm --name ${CONTAINER_NAME} -e DEFAULT_GIST=${DEFAULT_GIST} -e GH_CLIENT_SECRET=${GH_CLIENT_SECRET} -e GH_CLIENT_ID=${GH_CLIENT_ID} --volume /tmp:/opt/app-root/src/css/theme/gists ${IMG}
ExecStop=-/usr/bin/podman rm --force ${CONTAINER_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment