Skip to content

Commit

Permalink
add ping demo
Browse files Browse the repository at this point in the history
  • Loading branch information
legokichi committed Dec 6, 2024
1 parent 1f60841 commit 4fb6120
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 0 deletions.
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": 1,
"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

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
}

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

0 comments on commit 4fb6120

Please sign in to comment.