summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fabfile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/fabfile.py b/fabfile.py
index b87f352..93df7de 100644
--- a/fabfile.py
+++ b/fabfile.py
@@ -2,6 +2,7 @@ from fabric.api import env, local, put, run, sudo, task
env.hosts = ['theos.kyriasis.com', 'lucifer.kyriasis.com']
+
def checksum_match(local_file, remote_file):
md5 = '/usr/bin/md5sum {}'
local_sum = local(md5.format(local_file), capture=True).split()[0]
@@ -9,6 +10,7 @@ def checksum_match(local_file, remote_file):
return local_sum == remote_sum
+
@task
def upload_conf():
local_file = '{}/smtpd.conf'.format(env.host)
@@ -19,6 +21,7 @@ def upload_conf():
use_sudo=True)
sudo('systemctl restart smtpd.service')
+
@task
def upload_users():
local_file = 'common/users'