diff options
-rw-r--r-- | fabfile.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -15,7 +15,8 @@ def upload_conf(): if not checksum_match(local_file, '/etc/smtpd/smtpd.conf'): print("Config changed, uploading new file...") - put(local_path=local_file, remote_path='/etc/smtpd/smtpd.conf') + put(local_path=local_file, remote_path='/etc/smtpd/smtpd.conf', + use_sudo=True) sudo('systemctl restart smtpd.service') @task @@ -24,5 +25,6 @@ def upload_users(): if not checksum_match(local_file, '/etc/smtpd/users'): print("Users changed, uploading new file...") - put(local_path=local_file, remote_path='/etc/smtpd/users') + put(local_path=local_file, remote_path='/etc/smtpd/users', + use_sudo=True) sudo('smtpctl update table users') |