add ssl handling
This commit is contained in:
		@@ -19,7 +19,11 @@ def main():
 | 
			
		||||
    Entry point for mqtt logger.
 | 
			
		||||
    '''
 | 
			
		||||
    logging.basicConfig(format=LOG_FORMAT, filename=OWN_LOG_FILE)
 | 
			
		||||
    conn = mqtt.Mqtt(hostname='localhost', subscribe=['#'])
 | 
			
		||||
    conn = mqtt.Mqtt(hostname='localhost', port=8883,
 | 
			
		||||
                     ca_certs='/etc/letsencrypt/live/mqtt.blackfinn.de/chain.pem',
 | 
			
		||||
                     certfile='/etc/letsencrypt/live/mqtt.blackfinn.de/cert.pem',
 | 
			
		||||
                     keyfile='/etc/letsencrypt/live/mqtt.blackfinn.de/privkey.pem',
 | 
			
		||||
                     subscribe=['#'])
 | 
			
		||||
    if conn.connect() is False:
 | 
			
		||||
        logging.error('couldn\'t connect...')
 | 
			
		||||
        return 1
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user