Files
RSSHub-python/bin/restart_docker.sh
2022-05-14 11:03:31 +08:00

11 lines
476 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#! /bin/bash
echo "重启Docker容器名称为 rsshub">>/home/lxf/log/restartdocker.log
docker restart rsshub
echo "重启命令的执行状态:"$?>>/home/lxf/log/restartdocker.log
if [ $? -eq 0 ]; then
echo "执行成功!">> /home/lxf/log/restartdocker.log
else
echo "执行失败!">> //home/lxf/log/restartdocker.log
exit
fi
echo "重启Docker容器 rsshub 完毕!输出日志在/home/lxf/log/restartdocker.log中">> /home/lxf/log/restartdocker.log