代码拉取完成,页面将自动刷新
#!/usr/bin/env python
# -*- coding:utf-8 -*-
'''
@time: 2017/4/13 15:40
@author: Silence
'''
from fabric.api import *
from fabric.colors import *
env.hosts = ['117.114.138.52:10125']
env.user = 'root'
env.password = 'passw0rd'
def hello():
print 'hello world!'
def hillo(name,value):
print '%s = %s!'%(name,value)
def isFab():
local('cd D:')
local('dir')
def show():
print green('success')
print red('fail')
print yellow('yellow')
def test():
with cd('/root'):
run('du -sh')
def deploy():
with cd('/root/workspace/faceapp'):
run('git pull')
sudo('supervisorctl restart faceapp')
sudo('supervisorctl status')
def git(c):
local('git add .')
local("git commit -m'%s'" % c)
local('git push origin master')
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。