google API - gcalcli - error running in a script

Asked

Viewed 255 times

5

Carrying on my problem reported here now I can send events from shell-script directly to google calendar, I made a script to run as scheduled, follow file sms.sh down below

#!/bin/bash
let oneminf=`date +%s`+600
dateonemin=`date -d @$oneminf +%R`
gcalcli --calendar 'zabbix' --title "$3" --when $dateonemin --reminder '1m sms' --where '' --descr '' --duration 1 add > /dev/null 2>&1 >> /tmp/zabbix_server.log

This script was drawn up on the basis of link

When I run it shell directory it does the insertion in the agenda

$/etc/zabbix/scripts/sms.sh "[parametroZabbix]:PROBLEM" 

But when the Zabbix program fires the Trigger that calls this file sms.sh he gives me an exit message like this:

    Sign in with your Google Account

[avatar_2x]

Email [                    ] Password [                    ] [Sign in] Need
help?
Create an account

One Google Account for everything Google

[logo_strip_2x]

  ⢠Google
  ⢠Privacy
  ⢠Terms

I’ve made the command $gcalcli agenda --noauth_local_webserver with the user Zabbix which is the user running the application, and yet it keeps giving this error.

1 answer

0


For those who are still interested I restarted the machine ( linux ) and returned to work normally, very strange...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.