Last active
June 2, 2017 07:57
-
-
Save toke/5b875c642182b3520d8a2038343371ed to your computer and use it in GitHub Desktop.
Basic hostname systemd "service"
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
[Unit] | |
Description=Hostname Socket | |
[Socket] | |
ListenStream=101 | |
Accept=true | |
[Install] | |
WantedBy=sockets.target |
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
[Unit] | |
Description=hostname service | |
#Requires=hostname.socket | |
#After=syslog.target network.target | |
[Service] | |
ExecStart=/bin/hostname -f | |
RemainAfterExit=no | |
StandardInput=socket | |
StandardOutput=inherit | |
[Install] | |
WantedBy=multi-user.target | |
Also=hostname.socket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment