if [ $(gpsctl -s) -eq 1 ]; then # Wenn GPS Signal vorhanden
latitude=$(gpsctl -i)
longitude=$(gpsctl -x)
uci set gps.aktuelleposition.longitude=$longitude
uci set gps.aktuelleposition.latitude=$latitude
uci commit gps
/etc/init.d/gpsd reload
else
gsmctl -S -s “+49xxxxxxxxxxx Kein GPS Empfang Geozaun nicht gesetzt”
fi
On the RUT956, this only works via the console CLI. The script doesn’t set the geofence values in the I/O Juggler. How do I get the necessary permissions for usi set gps.longitude/latitude? It seems that the rights are missing in the context of the I/O juggler.
To help investigate this issue further, could you please clarify the following:
Script execution context:
When you test the script manually via SSH/CLI, are you logged in as the root user?
I/O Juggler script setup:
In the I/O Juggler action, did you upload the script directly in the rule or did you specify a script path? Note that the RUT956 has a Custom Scripts section in the web UI that is intended for scripts executed at boot via /etc/rc.local, which is separate from the scripts uploaded in I/O Juggler actions.
Observed results:
What exactly happens when the script is triggered by the I/O Juggler — does it simply do nothing, or are there any visible results (e.g., partial behavior or unexpected output)?
Error outputs/logs:
Are there any error messages in the system logs or in the Juggler trigger results? Screenshots or log excerpts would be very helpful.
Getting these details will help determine whether this is a permission/context issue, a script upload path issue, or something else in the I/O Juggler configuration.
When I test the script manually via CLI, I am the root user. Then everything executes correctly.
Whether I upload the script normally or from a path does not change the fact that it is executed incorrectly.
The script runs without any visible errors. The SMS sending commands are executed correctly. Only the coordinates are not changed via ‘uci set’. This can be seen in the map under gps/geofence. The location is not changed; the old coordinates remain.
There are no error messages.
As I already mentioned, everything works correctly up to RUT9M_R_00.07.13.4; the coordinates in the geofence are set correctly. I also tested versions RUT9M_R_00.07.20.3 and RUT9M_R_00.07.21.1. In both, the script works in the CLI as root, but not in the I/O Juggler. In the latter case, only the SMS commands are executed, but the new geofence coordinates are not set.