导读 8月科学教育网小李来为大家讲解下。ccproxy破解版,ccproxy8.0注册码这个很多人还不知道,现在让我们一起来看看吧!今天,是Linux回炉的第八...

8月科学教育网小李来为大家讲解下。ccproxy破解版,ccproxy8.0注册码这个很多人还不知道,现在让我们一起来看看吧!

今天,是Linux回炉的第八十七天

shell

docker-registry

#!/bin/bash

while true

do

AA=`netstat -lntup|grep docker-proxy|sed -n 1p|awk '{print $7}'|awk -F '/' '{print $1}'`

BB=`ps -ef|grep docker|grep -v grep |grep /run/containerd/containerd.sock|wc -l`

CC=`ps -ef|grep docker|grep -v grep|grep -v /run/containerd/containerd.sock|wc -l`

HH=`docker ps|grep -v CONTAINER|awk '{print $17}'`

GG=`ping -c5 192.168.1.105|sed -n 9p|awk -F ',' '{print $2}'|awk '{print $1}'`

if [ $GG == 5 ]

then

if [ $AA ]

then

if [ $BB == 1 ]

then

echo "docker运行正常"

else

systemctl stop docker

systemctl start docker

fi

if [ $CC == 3 ]

then

echo "registry运行正常"

else

docker run -d -p 5000:5000 -v /opt/registry:/var/lib/registry registry:latest

fi

else

echo "docker未启动"

fi

DD=`date "+%Y-%m-%d %H:%M:%S"|awk '{print $2}'|awk -F ':' '{print $1}'`

if [ $DD == 00 ]||[ $DD == 04 ]||[ $DD == 08 ]||[ $DD == 12 ]||[ $DD == 16 ]||[ $DD == 20 ]

then

docker logs "$HH"|wc -l>1.txt

fi

EE=`cat 1.txt`

docker logs "$HH"|wc -l>2.txt

FF=`cat 2.txt`

if [ $FF -gt $EE ]

then

II=$(($FF-$EE))

docker logs --tail="$II" $HH

else

echo "暂无人操作docker私有仓库"

fi

sleep 5

else

echo "请检查网络"

fi

sleep 5

done

本文ccproxy破解版,ccproxy8.0注册码到此分享完毕,希望对大家有所帮助。