Skip to content

Commit

Permalink
Opt: Speedup container start
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Aug 8, 2024
1 parent f0912dd commit f857023
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ RUN cp -rf /root/antizapret/patches/etc/openvpn/server/*.conf /etc/openvpn/serve
&& cp -rf /root/antizapret/patches/root/dnsmap/* /root/dnsmap/ \
&& cp -rf /root/antizapret/patches/etc/knot-resolver/kresd.conf /etc/knot-resolver/kresd.conf \
&& cp -rf /root/antizapret/patches/root/easy-rsa-ipsec/templates/*.conf /root/easy-rsa-ipsec/templates/ \
&& cp -rf /root/antizapret/patches/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
&& cd /root/antizapret/ \
&& chmod +x patches/*.sh \
&& git pull && ./patches/fix.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

[Unit]
Description=Wait for Network to be Configured
Documentation=man:systemd-networkd-wait-online.service(8)
ConditionCapability=CAP_NET_ADMIN
DefaultDependencies=no
Conflicts=shutdown.target
BindsTo=systemd-networkd.service
After=systemd-networkd.service
Before=network-online.target shutdown.target

[Service]
Type=oneshot
ExecStart=sleep 1
RemainAfterExit=yes

[Install]
WantedBy=network-online.target

0 comments on commit f857023

Please sign in to comment.