Last active
February 27, 2018 23:19
-
-
Save zealws/adfe79645837169fbf09fb40066b15ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/[email protected] | |
[Unit] | |
Description=say hello | |
OnFailure=hello2.service | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/echo "%I" | |
ExecStart=/bin/echo "%i" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zeal@epona /etc/systemd/system $ sudo systemctl start "[email protected]" | |
zeal@epona /etc/systemd/system $ sudo systemctl status "[email protected]" | |
● [email protected] - say hello | |
Loaded: loaded (/etc/systemd/system/[email protected]; static; vendor preset: disabled) | |
Active: inactive (dead) | |
Feb 27 15:11:52 epona systemd[1]: Starting say hello... | |
Feb 27 15:11:52 epona echo[22733]: foo/bar | |
Feb 27 15:11:52 epona echo[22734]: foo-bar | |
Feb 27 15:11:52 epona systemd[1]: Started say hello. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zeal@epona /etc/systemd/system $ sudo systemctl start 'hello@/foo-bar/baz.service' | |
zeal@epona /etc/systemd/system $ sudo systemctl status 'hello@/foo-bar/baz.service' | |
● [email protected] - say hello | |
Loaded: loaded (/etc/systemd/system/[email protected]; static; vendor preset: disabled) | |
Active: inactive (dead) | |
Feb 27 15:04:58 epona systemd[1]: Starting say hello... | |
Feb 27 15:04:58 epona echo[22138]: /foo/bar/baz | |
Feb 27 15:04:58 epona echo[22139]: -foo-bar-baz | |
Feb 27 15:04:58 epona systemd[1]: Started say hello. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zeal@epona /etc/systemd/system $ sudo systemctl start "hello@$(systemd-escape /foo-bar/baz).service" | |
zeal@epona /etc/systemd/system $ sudo systemctl status "hello@$(systemd-escape /foo-bar/baz).service" | |
● hello@-foo\x2dbar-baz.service - say hello | |
Loaded: loaded (/etc/systemd/system/[email protected]; static; vendor preset: disabled) | |
Active: inactive (dead) | |
Feb 27 15:06:54 epona systemd[1]: Starting say hello... | |
Feb 27 15:06:54 epona echo[22344]: /foo-bar/baz | |
Feb 27 15:06:54 epona echo[22345]: -foo\x2dbar-baz | |
Feb 27 15:06:54 epona systemd[1]: Started say hello. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment