4 Star 3 Fork 5

OpenCloudOS/OpenCloudOS-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ocos 2.17 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
#
# ocos command
# g_CAPD_SRDC_OS@tencent.com
#
. /usr/lib/opencloudos-tools/sys-manage/ocos-lib.sh
scriptversion=4.1;
scriptdate=2022-06-02;
usage="\
ocos version $scriptversion
Usage:
ocos OpenCloudOS Server System Management Toolset
ocos -a | -A | analyze Analyze the system performance
ocos -b | -B | backup [ reboot ] Backup the system online, or reboot to backup
ocos -c | -C | check [ rpm_name ] Check the modified rpms
ocos -r | -R | recover | reinstall Recover or Reinstall the system
ocos -u | -U | update [ rpm_name ] Update the system
ocos -i | -I | install [ rpm_name ] install rpms
ocos -s | -S | show Show the system version
ocos -ch| check-health [ -o OUTPUT_PATH ] Check system health status
ocos -cu| check-update Check available package updates
ocos ops ... Operation tools
ocos -h | -H | help Show this usage
ocos -v | -V | version Show the script version
"
if [[ "$0" =~ (^|/)oc-ops$ ]]; then
ops $@
fi
if [ $# -eq 0 ]; then
echo "$usage"
ocos_show;
fi
while test $# -ne 0; do
case $1 in
-u | update) shift
ocos_update $@
break;;
-i | -I | install) shift
ocos_install $@
break;;
-s | -S | show)
ocos_show;;
-a | -A | analyze)
ocos_analyze $2
break;;
-b | -B | backup)
ocos_backup $2
break;;
-r | -R | recover | reinstall) shift
ocos_recover $@
break;;
-c | -C | check) ocos_check $2
shift;;
-cu | check-update) ocos_check_update;;
-ch | check-health) shift
ocos_check_health $@
break;;
ops) shift; ops "$@"
break;;
-h | -H | help) echo "$usage"; exit $?;;
-v | -V | version) echo "$scriptversion";;
--) shift
break;;
*) echo "$0: invalid option: $1" >&2
echo "$usage"
exit 1;;
esac
shift
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/OpenCloudOS/OpenCloudOS-tools.git
git@gitee.com:OpenCloudOS/OpenCloudOS-tools.git
OpenCloudOS
OpenCloudOS-tools
OpenCloudOS-tools
main

搜索帮助