mirror of
https://github.com/ep1cman/unifi-protect-backup.git
synced 2025-12-23 03:33:29 +00:00
16 lines
393 B
Python
16 lines
393 B
Python
import apprise
|
|
|
|
notifier = apprise.Apprise()
|
|
|
|
|
|
def add_notification_service(url):
|
|
config = apprise.AppriseConfig()
|
|
config.add_config(url, format='text')
|
|
|
|
# If not tags are specified, default to errors otherwise ALL logging will
|
|
# be spammed to the notification service
|
|
if not config.servers()[0].tags:
|
|
config.servers()[0].tags = {'ERROR'}
|
|
|
|
notifier.add(config)
|