diff --git a/ping/.actdk/dependencies.json b/ping/.actdk/dependencies.json new file mode 100644 index 0000000..5c85617 --- /dev/null +++ b/ping/.actdk/dependencies.json @@ -0,0 +1,10 @@ +{ + "apt": [], + "pip": [], + "raspberrypi-bullseye": { + "apt": [ + "iputils-ping" + ], + "pip": [] + } +} \ No newline at end of file diff --git a/ping/.actdk/files.json b/ping/.actdk/files.json new file mode 100644 index 0000000..90bc423 --- /dev/null +++ b/ping/.actdk/files.json @@ -0,0 +1,5 @@ +{ + "main": "main", + "healthchecker": "healthchecker", + "act_setting": "act_settings.json" +} \ No newline at end of file diff --git a/ping/.actdk/setting.json b/ping/.actdk/setting.json new file mode 100644 index 0000000..8e31d05 --- /dev/null +++ b/ping/.actdk/setting.json @@ -0,0 +1,9 @@ +{ + "app_id": "ping", + "app_server_id": 53, + "short_description": null, + "short_descriptions": {}, + "target_types": [ + "raspberrypi-bullseye" + ] +} diff --git a/ping/.gitignore b/ping/.gitignore new file mode 100644 index 0000000..d10401d --- /dev/null +++ b/ping/.gitignore @@ -0,0 +1,2 @@ +.actdk/cache + diff --git a/ping/README.md b/ping/README.md new file mode 100644 index 0000000..70ae8d9 --- /dev/null +++ b/ping/README.md @@ -0,0 +1,7 @@ +# ping + +## 概要 + +shell script で ping の結果を actlog として送信するサンプルアプリです。 + +最低限の実装なので takephoto などには対応していません。 diff --git a/ping/act_settings.json b/ping/act_settings.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/ping/act_settings.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/ping/app/healthchecker b/ping/app/healthchecker new file mode 100755 index 0000000..3395065 --- /dev/null +++ b/ping/app/healthchecker @@ -0,0 +1,3 @@ +#!/bin/bash + +true diff --git a/ping/app/main b/ping/app/main new file mode 100755 index 0000000..b26d8ee --- /dev/null +++ b/ping/app/main @@ -0,0 +1,11 @@ +#!/bin/bash + +function tojson { + while read -r line; do + echo "[{\"data\":\"${line}\"}]" + done +} +# os4 以降は不要 +#trap 'kill $(jobs -p) 2>/dev/null; exit 0' TERM +(ping actcast.io 2>&1 | tojson) & +wait diff --git a/ping/data_schema.json b/ping/data_schema.json new file mode 100644 index 0000000..3ff28c0 --- /dev/null +++ b/ping/data_schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://actcast.io/schema/v8/data_schema_schema.json", + "type": "array", + "items": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "some data" + } + }, + "required": [ + "data" + ] + } +} \ No newline at end of file diff --git a/ping/manifesto/bullseye.json b/ping/manifesto/bullseye.json new file mode 100644 index 0000000..1e42cf4 --- /dev/null +++ b/ping/manifesto/bullseye.json @@ -0,0 +1,11 @@ +{ + "version": 2, + "allow_all_networks": true, + "target_type": "raspberrypi-bullseye", + "boards": [ + "RSPi3BPlus", + "RSPi4B" + ], + "devices": [] +} + diff --git a/ping/setting_schema.json b/ping/setting_schema.json new file mode 100644 index 0000000..729daf4 --- /dev/null +++ b/ping/setting_schema.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://actcast.io/schema/v8/setting_schema_schema.json", + "type": "object", + "properties": {}, + "required": [] +} \ No newline at end of file