Created
August 29, 2019 14:17
-
-
Save gdamjan/d64a73e675c6034e441cbc9bf441ddfb to your computer and use it in GitHub Desktop.
This file contains 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/custom.target | |
[Unit] | |
AllowIsolate=yes |
This file contains 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
sudo systemctl add-requires custom.target testA.service testB.service | |
sudo systemctl start custom.target | |
sudo systemctl stop testB |
This file contains 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/testA.service | |
[Unit] | |
Description=test | |
PartOf=custom.target | |
[Service] | |
Type=simple | |
ExecStart=/bin/sleep infinity | |
PrivateDevices=yes |
This file contains 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/testB.service | |
[Unit] | |
Description=test | |
PartOf=custom.target | |
[Service] | |
Type=simple | |
ExecStart=/bin/sleep infinity | |
PrivateDevices=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment