代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。