Add actual task implementations
This commit is contained in:
parent
7a7543bf33
commit
b1c37bdb08
26
fabfile.py
vendored
26
fabfile.py
vendored
@ -12,10 +12,34 @@ def doesitsparkjoy(c):
|
||||
c.run('sudo systemctl restart nginx')
|
||||
print('Released <3')
|
||||
|
||||
@task
|
||||
def voicegardens(c):
|
||||
"""Release voicegardens.org."""
|
||||
print('Releasing voicegardens.org ...')
|
||||
with c.cd('/var/www/voicegardens.org'):
|
||||
c.run('git pull origin master')
|
||||
c.run('sudo supervisorctl restart voicegardens')
|
||||
c.run('sudo systemctl restart nginx')
|
||||
print('Released <3')
|
||||
|
||||
@task
|
||||
def dailycron(c):
|
||||
"""Copy new crontab."""
|
||||
print('Copy over new crontab ...')
|
||||
# See https://github.com/fabric/fabric/issues/1750
|
||||
c.put('./cron/voicegardens', remote='./')
|
||||
c.sudo('mv voicegardens /etc/cron.daily')
|
||||
print('New cron in place <3')
|
||||
|
||||
@task
|
||||
def cleanarchives(c):
|
||||
"""Release doesitsparkjoy.voicegardens.org."""
|
||||
"""Remove all archives."""
|
||||
print('Removing the doesitsparkjoy.voicegardens.org archives ...')
|
||||
with c.cd('/var/www/doesitsparkjoy.voicegardens.org'):
|
||||
c.run('rm -rf ./voicegardens/archive/*')
|
||||
|
||||
print('Removing the voicegardens.org archives ...')
|
||||
with c.cd('/var/www/voicegardens.org'):
|
||||
c.run('rm -rf ./voicegardens/archive/*')
|
||||
|
||||
print('Deleted <3')
|
||||
|
Loading…
Reference in New Issue
Block a user