Compare commits

..

4 Commits

4 changed files with 30 additions and 4 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
/usr/bin/bash /opt/scripts/update/localip.sh
docker ps -a --format "table {{.Names}}\t{{.Status}}" > /opt/logs/docker_status.log docker ps -a --format "table {{.Names}}\t{{.Status}}" > /opt/logs/docker_status.log
while read line; do while read line; do
echo $line | grep -q 'Exited' echo $line | grep -q 'Exited'

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
sleep 60
ip link set enp1s0 promisc on ip link set enp1s0 promisc on
ip link set enp2s0 promisc on ip link set enp2s0 promisc on
ip link set wlx90de80ca01ec promisc on ip link set wlx90de80ca01ec promisc on
@ -7,6 +9,8 @@ ip link set wlx90de80ca01ec promisc on
/usr/bin/qbittorrent-nox --webui-port=10005 -d /usr/bin/qbittorrent-nox --webui-port=10005 -d
/usr/bin/bash /opt/scripts/update/jekyll_update.sh /usr/bin/bash /opt/scripts/update/jekyll_update.sh
/usr/bin/bash /opt/scripts/update/calibre.sh /usr/bin/bash /opt/scripts/update/calibre.sh
/usr/bin/bash /opt/scripts/update/localip.sh
# /usr/bin/mount -t ext4 -w UUID="b7c2c4b8-bfde-479b-80bb-655432a433b8" /opt/wd # /usr/bin/mount -t ext4 -w UUID="b7c2c4b8-bfde-479b-80bb-655432a433b8" /opt/wd

15
update/localip.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
localip='/opt/wd/99-Temp/localip.txt'
> $localip
networks=('wlx90de80ca01ec' 'enp1s0' 'enp2s0')
for network in ${networks[@]}; do
ifconfig $network | grep -iq 'Device not found'
if [[ $? -ne 0 ]]; then
echo -n "$network: " >> $localip
ifconfig $network | grep 'inet ' | awk '{print $2}' >> $localip
echo >> $localip
fi
done
sed -i '/^$/d' $localip

View File

@ -242,6 +242,8 @@ systemctl start nginx.service
# ============================================================================================================= # =============================================================================================================
# install jekyll # install jekyll
echo -e "\n\e[1;34mInstall jekyll blog env...\e[0m\n" echo -e "\n\e[1;34mInstall jekyll blog env...\e[0m\n"
gem sources --add https://mirrors.tuna.tsinghua.edu.cn/rubygems/ --remove https://rubygems.org/
gem sources -l
gem install jekyll jekyll-paginate gem install jekyll jekyll-paginate
jekyll b -s /opt/apps/blog/ -d /opt/websites/blog/ jekyll b -s /opt/apps/blog/ -d /opt/websites/blog/
@ -303,13 +305,16 @@ docker network create -d bridge --subnet=10.10.0.0/24 --gateway 10.10.0.1 inner
# option ifname 'eth0' # option ifname 'eth0'
# option proto 'static' # option proto 'static'
# option netmask '255.255.255.0' # option netmask '255.255.255.0'
# option gateway '192.168.0.1' # option gateway '192.168.31.1'
# option ip6assign '60' # option ip6assign '60'
# option dns ' 8.8.8.8 114.114.114.114' # option dns ' 8.8.8.8 114.114.114.114'
# option ipaddr '192.168.0.254' # option ipaddr '192.168.31.123'
# option broadcast '192.168.0.255' # option broadcast '192.168.31.255'
# /etc/init.d/network restart # /etc/init.d/network restart
# modify the above according to different situations # modify the above according to different situations, and the following is another method to do this
# docker network create -d macvlan --subnet=192.168.31.1/24 --gateway=192.168.31.2 -o parent=enp1s0 net_openwrt
# docker run -d --name openwrt --net net_openwrt --privileged --ip 192.168.183.123 sulinggg/openwrt:x86_64 /sbin/init
# when using openwrt or another ethernet port, keep in mind that need to modify ip addr accordingly
# ============================================================================================================= # =============================================================================================================
# configure cloudreve after mysql docker is up # configure cloudreve after mysql docker is up