Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ sudo systemctl start helloworld2@{1..4}.service
- Failed to start [email protected]: Unit [email protected] failed to load: No such file or directory.
- Failed to start [email protected]: Unit [email protected] failed to load: No such file or directory.
- Failed to start [email protected]: Unit [email protected] failed to load: No such file or directory.
- Failed to start [email protected]: Unit [email protected] failed to load: No such file or directory.
- core@core-01 /etc/systemd/system $ systemctl list-unit-files | grep helloworld
- helloworld.service enabled
- helloworld2.service enabled
- $ systemctl cat helloworld2.service
- # /etc/systemd/system/helloworld2.service
- [Unit]
- Description=%n Service
- After=docker.service
- Requires=docker.service
- [Service]
- TimeoutStartSec=0
- ExecStartPre=-/usr/bin/docker kill %p-%i
- ExecStartPre=-/usr/bin/docker rm %p-%i
- ExecStartPre=/usr/bin/docker pull busybox
- ExecStart=/usr/bin/docker run --name %p-%i busybox /bin/sh -c "while true; do echo Hello from %p-%i running on %H; sleep 1; done"
- ExecStop=-/usr/bin/docker rm -f %p-%i
- [Install]
- WantedBy=multi-user.target
Add Comment
Please, Sign In to add comment