Skip to content

Script notification howto #863

Answered by crazy-max
spacedogs-wtf asked this question in Q&A
Discussion options

You must be logged in to vote

@spacedogs-wtf echo 'hello' is not a valid command. If you want to pass args you have to use the DIUN_NOTIF_SCRIPT_ARGS env as explained in the documentation:

version: "3.7"

services:
  diun:
    image: crazymax/diun:latest
    container_name: diun
    restart: always
    volumes:
      - /diun/data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - "TZ=Europe/Berlin"
      - "LOG_LEVEL=info"
      - "LOG_JSON=false"
      - "DIUN_WATCH_SCHEDULE=0 */6 * * *"
      - "DIUN_WATCH_FIRSTCHECKNOTIF=true"
      - "DIUN_PROVIDERS_DOCKER=true"
      - "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true"
      - "DIUN_NOTIF_SCRIPT_CMD=echo"
      - "DIUN_NOTIF_SCRIPT_ARGS=hello"

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by crazy-max
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #215 on May 04, 2023 22:25.