add serviceinfo generator
This commit is contained in:
parent
b5655d9f81
commit
f909307d58
45
serviceinfo/_serviceinfo.json
Normal file
45
serviceinfo/_serviceinfo.json
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0",
|
||||||
|
"id": "https://drop.chapril.org/",
|
||||||
|
"name": "Partage de fichier Chapril",
|
||||||
|
"software": {
|
||||||
|
"name": "__SOFT_NAME__",
|
||||||
|
"version": "__SOFT_VERSION__",
|
||||||
|
"repository": "__SOFT_REPO__"
|
||||||
|
},
|
||||||
|
"organization": {
|
||||||
|
"name": "Chapril",
|
||||||
|
"contact": "https://www.chapril.org/contact.html"
|
||||||
|
},
|
||||||
|
"protocols": [
|
||||||
|
{
|
||||||
|
"name": "http",
|
||||||
|
"capabilities": [
|
||||||
|
{
|
||||||
|
"presence": false,
|
||||||
|
"mam": false,
|
||||||
|
"in-band-registration": false,
|
||||||
|
"web-registration": false,
|
||||||
|
"storage-quota": "1024",
|
||||||
|
"upload-autovaccum": "5d",
|
||||||
|
"irc-gateway": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"otherServices": {
|
||||||
|
"outbound": [],
|
||||||
|
"inbound": []
|
||||||
|
},
|
||||||
|
"signups": "closed",
|
||||||
|
"visibilityPreferences": {
|
||||||
|
"allowCrawling": false,
|
||||||
|
"preferUnlisted": false
|
||||||
|
},
|
||||||
|
"metrics": [
|
||||||
|
|
||||||
|
],
|
||||||
|
"features": [
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
16
serviceinfo/update_serviceinfo
Executable file
16
serviceinfo/update_serviceinfo
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TEMPLATE=/srv/drop/tools/serviceinfo/_serviceinfo.json
|
||||||
|
TARGET_FILE=/var/www/html/_serviceinfo.json
|
||||||
|
|
||||||
|
SOFT_NAME=$(jq -r .name /srv/drop/www/package.json)
|
||||||
|
SOFT_VERSION=$(jq -r .version /srv/drop/www/package.json)
|
||||||
|
SOFT_REPO=$(jq -r .homepage /srv/drop/www/package.json)
|
||||||
|
|
||||||
|
cat "${TEMPLATE}" \
|
||||||
|
| sed "s|__SOFT_NAME__|${SOFT_NAME}|" \
|
||||||
|
| sed "s|__SOFT_VERSION__|${SOFT_VERSION}|" \
|
||||||
|
| sed "s|__SOFT_REPO__|${SOFT_REPO}|" \
|
||||||
|
> ${TARGET_FILE}
|
Loading…
Reference in New Issue
Block a user