Skip to content

Instantly share code, notes, and snippets.

@trigun117
Last active June 30, 2018 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trigun117/fe6d389e96a43997480737cffa58a993 to your computer and use it in GitHub Desktop.
Save trigun117/fe6d389e96a43997480737cffa58a993 to your computer and use it in GitHub Desktop.
Reboot MTProto docker container
#!/bin/sh
while true
do
export CONTAINERID=$(sudo docker ps --format '{{.ID}}')
export COMMANDTOEXEC="sudo docker stop $CONTAINERID && sudo docker run -d -p 443:443 -p 80:80 -e WORKERS=16 -e TAG=$MTPROTOTAG --restart=always -v proxy-config:/data trigun117/mtproto_proxy_stat"
eval $COMMANDTOEXEC
sleep 2h
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment