I am trying to connect my cumulocity-rpi-agent to cumulocity so that I can have two options either accept or cancel. But this options will be available only when i execute sh c8y-agent-debug.sh
this file using sh
command. I followed below steps
1) wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb
2) sudo dpkg -i cumulocity-rpi-agent-latest.deb
And:
login as: pi
pi@raspberrypi.mshome.net's password:
...
pi@raspberrypi:~ $ cd /usr/share/
pi@raspberrypi:/usr/share $ cd cu
cumulocity-rpi-agent/ cups/
pi@raspberrypi:/usr/share $ cd cumulocity-rpi-agent/
pi@raspberrypi:/usr/share/cumulocity-rpi-agent $ sh c8y-agent.sh
^C
pi@raspberrypi:/usr/share/cumulocity-rpi-agent $ sudo nano
pi@raspberrypi:/usr/share/cumulocity-rpi-agent
And:
#!/bin/sh
(
while true
do
echo "Running the Cumulocity Linux Agent..."
java -cp 'cfg/*:lib/*' -Dlogback.configurationFile=cfg/logback.xml c8y.lx.age$
sleep 1
done
) 2>&1 | logger
this is c8y-agent-debug.sh script
I execute this file using sh c8y-agent-debug.sh
or bash c8y-agent-debug.sh
but executing the file not event echo statement.
Do i need to set anything related to java. Java is already installed. Is there any additional setting required for that java -cp
command. Java is installed on /usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/
on this path. This is on linux. javac
and java
commands are working fine