Browse Source

Add actual task implementations

main
Luke Murphy 5 years ago
parent
commit
b1c37bdb08
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 26
      fabfile.py

26
fabfile.py

@ -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…
Cancel
Save