Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ping/.actdk/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"apt": [],
"pip": [],
"raspberrypi-bullseye": {
"apt": [
"iputils-ping"
],
"pip": []
}
}
5 changes: 5 additions & 0 deletions ping/.actdk/files.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "main",
"healthchecker": "healthchecker",
"act_setting": "act_settings.json"
}
9 changes: 9 additions & 0 deletions ping/.actdk/setting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"app_id": "ping",
"app_server_id": 53,
"short_description": null,
"short_descriptions": {},
"target_types": [
"raspberrypi-bullseye"
]
}
2 changes: 2 additions & 0 deletions ping/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.actdk/cache

7 changes: 7 additions & 0 deletions ping/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ping

## 概要

shell script で ping の結果を actlog として送信するサンプルアプリです。

最低限の実装なので takephoto などには対応していません。
1 change: 1 addition & 0 deletions ping/act_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions ping/app/healthchecker
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

true
11 changes: 11 additions & 0 deletions ping/app/main
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions ping/data_schema.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
11 changes: 11 additions & 0 deletions ping/manifesto/bullseye.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": 2,
"allow_all_networks": true,
"target_type": "raspberrypi-bullseye",
"boards": [
"RSPi3BPlus",
"RSPi4B"
],
"devices": []
}

6 changes: 6 additions & 0 deletions ping/setting_schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://actcast.io/schema/v8/setting_schema_schema.json",
"type": "object",
"properties": {},
"required": []
}