Move web-net to its own unit file
This commit is contained in:
parent
b004ea43e0
commit
12b7b7ed94
2 changed files with 15 additions and 17 deletions
11
unit-files/web-net.service
Normal file
11
unit-files/web-net.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Create lb_web network
|
||||||
|
Requires=docker.service
|
||||||
|
After=docker.service
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=true
|
||||||
|
ExecStart=/usr/bin/docker network create lb_web
|
||||||
|
ExecStop=/usr/bin/docker network rm lb_web
|
||||||
|
[Install]
|
||||||
|
WantedBy=local.target
|
21
user_data
21
user_data
|
@ -72,11 +72,11 @@ coreos:
|
||||||
url=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r \'.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))\') &&\
|
url=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r \'.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))\') &&\
|
||||||
curl -L $url > /opt/bin/docker-compose &&\
|
curl -L $url > /opt/bin/docker-compose &&\
|
||||||
chmod +x /opt/bin/docker-compose'
|
chmod +x /opt/bin/docker-compose'
|
||||||
- name: install-indiehosters.service
|
- name: install-libresh.service
|
||||||
command: start
|
command: start
|
||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Install IndieHosters
|
Description=Install libre.sh
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=true
|
RemainAfterExit=true
|
||||||
|
@ -85,19 +85,6 @@ coreos:
|
||||||
mkdir /{data,system} &&\
|
mkdir /{data,system} &&\
|
||||||
mkdir /data/trash &&\
|
mkdir /data/trash &&\
|
||||||
cp /libre.sh/unit-files/* /etc/systemd/system && systemctl daemon-reload &&\
|
cp /libre.sh/unit-files/* /etc/systemd/system && systemctl daemon-reload &&\
|
||||||
|
systemctl enable web-net.service &&\
|
||||||
|
systemctl start web-net.service &&\
|
||||||
cp /libre.sh/utils/* /opt/bin/'
|
cp /libre.sh/utils/* /opt/bin/'
|
||||||
- name: web-net.service
|
|
||||||
enable: true
|
|
||||||
command: start
|
|
||||||
content: |
|
|
||||||
[Unit]
|
|
||||||
Description=Create lb_web network
|
|
||||||
Requires=docker.service
|
|
||||||
After=docker.service
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
RemainAfterExit=true
|
|
||||||
ExecStart=/usr/bin/docker network create lb_web
|
|
||||||
ExecStop=/usr/bin/docker network rm lb_web
|
|
||||||
[Install]
|
|
||||||
WantedBy=local.target
|
|
||||||
|
|
Loading…
Reference in a new issue