generated from AsteroidOS/asteroid-helloworld
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I'm not entirely sure why, but trying to use curl to grab a calendar from a public url doesn't work when running trough script-shell.
- The script does work correctly when manually ssh'ing into the watch as ceres and run it using
/home/ceres/script-shell/03_update-agenda.sh, showing the script itself is fine. - script-shell does work correctly for turning on and off the wi-fi, making me believe it's more likely something specific to this scenario than an issue with script-shell not being correctly build or installed.
The contents of 03_update-agenda.sh are as follows. Of course, with redacted links and calendar names.
#!/bin/sh
url1="<URL>"
target1="/home/ceres/script-shell/1.ics"
url2="<URL>"
target2="/home/ceres/script-shell/2.ics"
# download and import calendar 1, overwrite old ones
echo "-> downloading calendar 1"
curl -o ${target1} ${url1} || exit 1
echo "-> importing calendar 1"
icalconverter import /home/ceres/script-shell/priv.ics -d || exit 1
# download and import together calendar 2, add on top
echo "-> downloading calendar 2"
curl -o ${target2} ${url2} || exit 1
echo "importing work calendar"
icalconverter import /home/ceres/script-shell/work.ics || exit 1
# return success message
echo "-> Successfully imported calendars"
exit 0
It runs until it breaks after this line. As in, I get this echo and then the ERR ending.
# download and import calendar 1, overwrite old ones
echo "-> downloading calendar 1"
curl -o ${target1} ${url1} || exit 1
Seems that when running the script trough script-shell, the curl fails for some reason returning the exit 1. However, I don't know what the difference is between running the script in script-shell (which breaks) and running it as after ssh'ing into the watch as ceres (which works).
Tested on a catfish_ext.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels