Auteur Topic: Welk commando voor verzending via sms - Anders dan synodemnotify  (gelezen 1153 keer)

Offline webbaets

  • Bedankjes
  • -Gegeven: 0
  • -Ontvangen: 0
  • Berichten: 5
ik vond ergens dat je het commando synodsmnotify kan gebruiken voor het verzenden van notificaties, deze notificaties worden enkel getoond als melding binnen DSM.
Wat is het commando om te verzenden met SMS of MAIL?

Command: synodsmnotify ADMuser "Title" "Your text here."
DS218: 2x 6TB WX11D39LFENX
DS213j: 2x 2TB WMC301041246

Offline dvandonkelaar

  • MVP
  • *
  • Bedankjes
  • -Gegeven: 12
  • -Ontvangen: 161
  • Berichten: 937
Re: Welk commando voor verzending via sms - Anders dan synodemnotify
« Reactie #1 Gepost op: 18 juni 2020, 14:28:12 »
Als ik zoek op welke beschikbare commands 'syno' en 'notif' bevatten d.m.v. de volgende code
compgen -c | grep syno | grep notif
dan krijg ik onderstaande resultaten
  • synotifyd
  • synodsmnotify
  • synonotify
  • synotifydutil
  • synoappnotify

Zelf heb ik hier nog nooit van gehoord, misschien dat je er wat aan hebt
--
dvandonkelaar

DS415+ 8GB | 2xWD30EZRX en 2xWD30EFRX | RAID5 EXT4 [Productie]
DS211J | 2x WD20EZRZ | RAID1 EXT4 [Backup]
Eaton Ellipse PRO 650 DIN (Schuko)

Offline bartmans99

  • MVP
  • *
  • Bedankjes
  • -Gegeven: 19
  • -Ontvangen: 85
  • Berichten: 678
    • http://www.jvwgoirle.nl
Re: Welk commando voor verzending via sms - Anders dan synodemnotify
« Reactie #2 Gepost op: 19 juni 2020, 08:23:53 »
Je zou een test SMS kunnen versturen via DSM en tegelijker via SSH de process list met 'top' in de gaten kunnen houden. Als je niet knippert met je ogen kun je wellicht zien welk commanda wordt gebruikt hiervoor.

Offline webbaets

  • Bedankjes
  • -Gegeven: 0
  • -Ontvangen: 0
  • Berichten: 5
Re: Welk commando voor verzending via sms - Anders dan synodemnotify
« Reactie #3 Gepost op: 21 juni 2020, 16:00:37 »
Gevonden  :)
Met de hulp van https://www.beatificabytes.be/send-custom-notifications-from-scripts-running-on-a-synology-new/

Korte uitleg:
  • Kopieer /usr/syno/synoman/webman/texts/nld/mails naar een eigen locatie ! /nl/ is de taal van je NAS !
  • Stel in 'mails' zelf je bericht en kopieer terug
  • Herstart je NAS
  • In je config bij melding vind je nu jouw bericht
  • In je bash script gebruik volgend commando >> /usr/syno/bin/synonotify tag_event

Wens je gebruik te maken van variablen dan is het
>> /usr/syno/bin/synonotify tag_event "{\"%YOUR_VAR%\":\"$VAR\"}"
DS218: 2x 6TB WX11D39LFENX
DS213j: 2x 2TB WMC301041246

Offline webbaets

  • Bedankjes
  • -Gegeven: 0
  • -Ontvangen: 0
  • Berichten: 5
Re: Welk commando voor verzending via sms - Anders dan synodemnotify
« Reactie #4 Gepost op: 14 mei 2022, 12:42:50 »
Sinds DSM 7.0 werkt dit niet meer. De oplossing is om Telegram in je bash-script te plaatsen.
Voorbeeld:
#!/bin/sh
# Read current IP from file
ipfile="/volume1/backup/Syno_Scripting/ip.txt"
read -d $'\x04' ip_current < "$ipfile"
# Telegram Cred's
API_KEY=123456:123456
CHAT_ID=987654
# Grab IP
ip=`curl -silent -L http://checkip.amazonaws.com|tail -n 1`
# Log runtimes
currentDATE=$(date '+%d/%m/%Y %H:%M:%S')
echo "$currentDATE - IP is $ip" >> /volume1/backup/Syno_Scripting/ip_log.txt
# Compare IP
if [ "$ip" != "$ip_current" ]; then
# Notify new IP
curl -s "https://api.telegram.org/bot$API_KEY/sendMessage?chat_id=$CHAT_ID&text=SynoName+-+New+external+IP-address+$ip"
# Set as current IP
echo "$ip" > $ipfile
fi
DS218: 2x 6TB WX11D39LFENX
DS213j: 2x 2TB WMC301041246


 

Weergave foto's wel of niet gekanteld, afhankelijk onder welk OS bekeken.

Gestart door BabyloniaBoard File Station

Reacties: 5
Gelezen: 4183
Laatste bericht 06 juli 2014, 00:53:52
door Babylonia
welk bestandsformaat hebben films in mediaserver?

Gestart door walbergBoard Media Server (UPNP/DLNA)

Reacties: 11
Gelezen: 4858
Laatste bericht 05 augustus 2015, 01:19:10
door Stephan296
Welk protocol gebruik jij onder Mac OSX om te connecten naar

Gestart door ValithBoard Mac OS X

Reacties: 5
Gelezen: 4819
Laatste bericht 04 mei 2008, 14:13:42
door smoldersonline
FD8164V gaat op disconnected. Welk poort mis ik??

Gestart door Randys-nlBoard Surveillance Station

Reacties: 4
Gelezen: 1604
Laatste bericht 17 juni 2015, 11:16:22
door Birdy
Welk video formaat???

Gestart door FlashhieBoard Media Server (UPNP/DLNA)

Reacties: 1
Gelezen: 2354
Laatste bericht 11 februari 2010, 14:33:03
door Björn