标签:脚本 oca TE example pre 云同步 rm -rf 阿里云 imp
#!/usr/bin/env python
#coding:utf-8
#Example:
#阿里云同步
#ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
#ntpdate time.nist.gov time.nuri.net 0.asia.pool.ntp.org 1.asia.pool.ntp.org 2.asia.pool.ntp.org 3.asia.pool.ntp.org
import os
command = [‘ntpdate time.nist.gov‘,
‘rm -rf /etc/localtime‘,
‘ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime‘,
‘hwclock -w‘,
"export TZ=‘Asia/Shanghai‘",
‘echo "export TZ=\‘Asia/Shanghai\‘" >> /root/.bashrc‘]
for com in command:
os.system(com)
标签:脚本 oca TE example pre 云同步 rm -rf 阿里云 imp
原文地址:http://blog.51cto.com/yht1990/2133763