Skip to content

Commit

Permalink
Merge pull request #8 from moetiker/patch-6
Browse files Browse the repository at this point in the history
Create create_hosts_file.service
  • Loading branch information
oetiker authored Jul 3, 2020
2 parents 2931ef1 + a9eeaec commit d8f5cd4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ubuntu/helpers/create_hosts_file.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Create a Hostfile
After=network.target auditd.service

[Service]
Type=oneshot
ExecStart=/usr/bin/mv /etc/hosts.lx /etc/hosts
ExecStart=/usr/bin/sed -i s/HOSTNAME/%H/g /etc/hosts
ExecStartPost=/bin/systemctl disable create_hosts_file.service

[Install]
WantedBy=multi-user.target
# last line

0 comments on commit d8f5cd4

Please sign in to comment.