Move config files and folders
This commit is contained in:
@@ -50,7 +50,8 @@ func New(config *Config) *Client {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Client) Publish(topicURL, message string, options ...PublishOption) error {
|
||||
func (c *Client) Publish(topic, message string, options ...PublishOption) error {
|
||||
topicURL := c.expandTopicURL(topic)
|
||||
req, _ := http.NewRequest("POST", topicURL, strings.NewReader(message))
|
||||
for _, option := range options {
|
||||
if err := option(req); err != nil {
|
||||
|
||||
12
client/ntfy-client.service
Normal file
12
client/ntfy-client.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=ntfy client
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=ntfy
|
||||
Group=ntfy
|
||||
ExecStart=/usr/bin/ntfy subscribe --config /etc/ntfy/client.yml --from-config
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user