Skip to content

Instantly share code, notes, and snippets.

@BugRoger
Created March 27, 2015 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BugRoger/f2e7aa62734f25482ace to your computer and use it in GitHub Desktop.
Save BugRoger/f2e7aa62734f25482ace to your computer and use it in GitHub Desktop.
systemd Sidekick
[Unit]
Requires=robin.service
Before=robin.service
[Service]
ExecStart=/bin/bash -c '\
echo "batman start"; \
while true; do \
echo "batman alive"; \
sleep 1; \
done'
ExecStop=/usr/bin/echo "batman stop"
[Unit]
Requires=batman.service
After=batman.service
BindsTo=batman.service
[Service]
ExecStart=/bin/bash -c '\
echo "robin start"; \
while true; do \
echo "robin alive"; \
sleep 1; \
done'
ExecStop=/usr/bin/echo "robin stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment