My phone doesn't seem to work with zabbix, so I decided to use a more stable and working program (gammu).
I've been able to script this program to work with a bash file (see this code
I've added the sudo part to be able to run this as root with no password set for /usr/bin/gammu
I've added this script to the external script dir and zabbix runs the script just fine when a trigger is needed.
The only issue is that the program is missing it's configuration file (this says which phone/connection etc)
When running this script it uses the .gammurc configuration file which is located in the root of my root user (type cd)
I've tried copying this file and chowning/chmoding it properly, but still it's not reading/finding this file. Probably because the zabbix user account cannot be used to login and thus it has no root dir to place this config file in?
Anybody using Gammu as a external script and know how to get around this?
I've been able to script this program to work with a bash file (see this code

Code:
#!/bin/bash echo $1 $2 $3 $4 | /usr/bin/sudo /usr/bin/gammu --sendsms TEXT 06123456789
I've added this script to the external script dir and zabbix runs the script just fine when a trigger is needed.
The only issue is that the program is missing it's configuration file (this says which phone/connection etc)
When running this script it uses the .gammurc configuration file which is located in the root of my root user (type cd)
I've tried copying this file and chowning/chmoding it properly, but still it's not reading/finding this file. Probably because the zabbix user account cannot be used to login and thus it has no root dir to place this config file in?
Anybody using Gammu as a external script and know how to get around this?


Comment