From 59ce378a352f91d30f321e7a650c4ad9a4076cd5 Mon Sep 17 00:00:00 2001 From: Maximilian Brandau Date: Mon, 23 Mar 2020 13:53:30 +0100 Subject: [PATCH] Adjust flags --- docs/notifications.md | 6 +++--- internal/flags/flags.go | 4 ++-- pkg/notifications/shoutrrr.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/notifications.md b/docs/notifications.md index 6a1a9e9..32ada29 100644 --- a/docs/notifications.md +++ b/docs/notifications.md @@ -121,7 +121,7 @@ docker run -d \ To send notifications via shoutrrr, the following command-line options, or their corresponding environment variables, can be set: -- `--notification-shoutrrr-url` (env. `WATCHTOWER_NOTIFICATION_SHOUTRRR_URL`): The shoutrrr service URL to be used. +- `--notification-url` (env. `WATCHTOWER_NOTIFICATION_URL`): The shoutrrr service URL to be used. Go to [https://github.com/containrrr/shoutrrr#service-urls](https://github.com/containrrr/shoutrrr#service-urls) to learn more about the different service URLs you can use. @@ -132,7 +132,7 @@ docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ -e WATCHTOWER_NOTIFICATIONS=shoutrrr \ - -e WATCHTOWER_NOTIFICATION_SHOUTRRR_URL=discord://channel/token \ - -e WATCHTOWER_NOTIFICATION_SHOUTRRR_URL=slack://watchtower@token-a/token-b/token-c \ + -e WATCHTOWER_NOTIFICATION_URL=discord://channel/token \ + -e WATCHTOWER_NOTIFICATION_URL=slack://watchtower@token-a/token-b/token-c \ containrrr/watchtower ``` \ No newline at end of file diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 4d54f92..29c0913 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -240,9 +240,9 @@ Should only be used for testing. "The Gotify Application required to query the Gotify API") flags.StringArrayP( - "notification-shoutrrr-url", + "notification-url", "", - viper.GetStringSlice("WATCHTOWER_NOTIFICATION_SHOUTRRR_URL"), + viper.GetStringSlice("WATCHTOWER_NOTIFICATION_URL"), "The shoutrrr URL to send notifications to") } diff --git a/pkg/notifications/shoutrrr.go b/pkg/notifications/shoutrrr.go index 4c7d2ab..a7d786c 100644 --- a/pkg/notifications/shoutrrr.go +++ b/pkg/notifications/shoutrrr.go @@ -22,7 +22,7 @@ type shoutrrrTypeNotifier struct { func newShoutrrrNotifier(c *cobra.Command, acceptedLogLevels []log.Level) t.Notifier { flags := c.PersistentFlags() - urls, _ := flags.GetStringArray("notification-shoutrrr-url") + urls, _ := flags.GetStringArray("notification-url") n := &shoutrrrTypeNotifier{ Urls: urls,