File tree Expand file tree Collapse file tree 8 files changed +24
-13
lines changed
Expand file tree Collapse file tree 8 files changed +24
-13
lines changed Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =Hass-Super Post init
3+ After =network-online.target
4+
5+ [Service]
6+ Type =oneshot
7+ ExecStart =run-parts /opt/init-wrapper/post-init.d
8+ StandardOutput =append:/tmp/hassio.log
9+ StandardError =append:/tmp/hassio.log
10+
11+ [Install]
12+ WantedBy =multi-user.target
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -ex
4+
5+ date ' +%Y-%m-%d %H:%M:%S Started.' >> /tmp/hassio.log
Original file line number Diff line number Diff line change 33set -ex
44
55if [ $( cat /etc/timezone) = " Asia/Shanghai" ]; then
6- mv -f /etc/apt/sources.list.d/ docker.ustc /etc/apt/sources.list.d/docker.list
6+ cat /opt/ docker.ustc > /etc/apt/sources.list.d/docker.list
77 apt-get -qq update > /dev/null
88fi
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- set -ex
3+ set -x
44
55if [ -f /var/run/docker.pid ]; then
66 exit 0
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- # fix for Synology
4- mkdir -p /run/systemd/unit-root/bin
5- mkdir -p /run/systemd/unit-root/lib/modules
6- ls -al /run/systemd/unit-root >> /tmp/hassio.log
7-
8- sed -i -e " s/ProtectSystem=true/ProtectSystem=false/" /lib/systemd/system/NetworkManager.service
9- systemctl mask systemd-tmpfiles-setup systemd-tmpfiles-clean
3+ if [ " $SYNOLOGY " = " true" ]; then
4+ systemctl enable post-init
5+ fi
Original file line number Diff line number Diff line change @@ -5,8 +5,5 @@ if [ ! -f /etc/rc.local ]; then
55 chmod +x /etc/rc.local
66fi
77
8- now=$( date " +%Y-%m-%d %H:%M:%S" )
98cmd=" run-parts /opt/init-wrapper/post-init.d"
10-
11- echo " echo '$now Started.' >> /tmp/hassio.log" >> /etc/rc.local
129echo " $cmd >> /tmp/hassio.log 2>&1" >> /etc/rc.local
Original file line number Diff line number Diff line change @@ -23,3 +23,4 @@ find /tmp/build/opt/init-wrapper/sbin \
2323 install -m 644 -o root -g root -p -D ${f} ${f#/ tmp/ build}
2424done
2525
26+ cp -rf /tmp/build/lib/* /lib/
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ chmod a+r /etc/apt/keyrings/docker*
3131
3232arch=$( dpkg --print-architecture)
3333echo " deb [arch=$arch signed-by=/etc/apt/keyrings/docker.asc] $DOWNLOAD_URL /linux/debian bookworm stable" > /etc/apt/sources.list.d/docker.list
34- echo " deb [arch=$arch signed-by=/etc/apt/keyrings/dockcn.asc] $DOCKER_CHINA /linux/debian bookworm stable" > /etc/apt/sources.list.d /docker.ustc
34+ echo " deb [arch=$arch signed-by=/etc/apt/keyrings/dockcn.asc] $DOCKER_CHINA /linux/debian bookworm stable" > /opt /docker.ustc
3535apt-get -qq update > /dev/null
3636apt-get -y -qq install docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin > /dev/null
3737apt-get -y -qq install iptables libip6tc2 libnetfilter-conntrack3 libnfnetlink0 libnftnl11 netbase > /dev/null
You can’t perform that action at this time.
0 commit comments