def push_ssl_crt():
    logger.info(u"Pushing SSl Certificates")
    key = '%(config_folder)s/%(ssl_key)s' % env
    crt = '%(config_folder)s/%(ssl_crt)s' % env
    bundle = '%(config_folder)s/rapidssl_ca_bundle.pem' % env
    logger.info(u"Using SSL keys and certs at %s and %s" % (key, crt))

    # Putting to /tmp and moving for permission purposes
    put(key, '/tmp/_.policystat.com.key')
    sudo('mv /tmp/_.policystat.com.key /etc/ssl/private/_.policystat.com.key')
    sudo('chmod 640 /etc/ssl/private/_.policystat.com.key')
    sudo('chown root:ssl-cert /etc/ssl/private/_.policystat.com.key')

    put(crt, '/tmp/_.policystat.com.crt')
    put(bundle, '/tmp/rapidssl_ca_bundle.pem')
    # Combine the crt with the rapidssl intermediate bundle
    sudo('cat /tmp/_.policystat.com.crt /tmp/rapidssl_ca_bundle.pem > \
    /tmp/_.policystat.com.crt.bundled')
    sudo(
        'mv /tmp/_.policystat.com.crt.bundled '
        '/etc/ssl/certs/_.policystat.com.crt'
    )
    sudo('chmod 777 /etc/ssl/certs/_.policystat.com.crt')
Push the wildcard ssl cert and the godaddy cert bundle to the remote host.
dataset/ETHPy150Open winhamwr/neckbeard/neckbeard/brain_wrinkles/pstat/app.py/push_ssl_crt