Compare commits
2 Commits
c8a635054d
...
0c60b0b118
Author | SHA1 | Date |
---|---|---|
|
0c60b0b118 | 2 years ago |
|
df0ccdb2bb | 2 years ago |
5 changed files with 67 additions and 96 deletions
@ -0,0 +1,3 @@
|
||||
# ChaprilInfos generator |
||||
|
||||
Cf. https://admin.chapril.org/doku.php?id=admin:services:statoolinfos.chapril.org |
@ -0,0 +1,48 @@
|
||||
# [File] |
||||
file.class=service |
||||
file.generator=StatoolInfos |
||||
file.datetime=__LAST_UPDATE__ |
||||
file.protocol=StatoolInfos-0.1.0 |
||||
|
||||
# [Service] |
||||
service.name=XMPP Chapril |
||||
service.description=Service de messagerie instantanée. |
||||
service.website=https://xmpp.chapril.org/ |
||||
service.logo=https://www.chapril.org/.well-known/chaprilinfos/chapril-logo-mini.png |
||||
service.legal.url=https://www.chapril.org/cgu.html |
||||
service.guide.technical=https://admin.chapril.org/doku.php?id=admin:services:xmpp.chapril.org |
||||
service.guide.user=https://www.chapril.org/XMPP |
||||
service.contact.url=https://www.chapril.org/contact.xhtml |
||||
service.contact.email=xmpp-support@chapril.org |
||||
service.startDate=08/03/2020 |
||||
service.endDate= |
||||
service.status.level=OK |
||||
service.status.description=Nominal |
||||
service.registration=Free |
||||
|
||||
# [Host] |
||||
host.name=Hetzner |
||||
host.server.type=VIRTUAL |
||||
host.provider.type=HOSTEDSERVER |
||||
host.country.name=Allemagne |
||||
host.country.code=DE |
||||
|
||||
# [Software] |
||||
software.name=ejabberd |
||||
software.website=https://www.ejabberd.im/ |
||||
software.license.url=https://github.com/processone/ejabberd/blob/master/COPYING |
||||
software.license.name=GPLv2 |
||||
software.version=__EJABBERD_VERSION__ |
||||
software.source.url=https://github.com/processone/ejabberd/ |
||||
|
||||
# [Metrics] |
||||
metrics.accounts.total.name = Nombre total de comptes |
||||
metrics.accounts.total.description = Nombre total de comptes créés |
||||
metrics.accounts.total.count = __TOTAL_USER_ACCOUNTS__ |
||||
|
||||
metrics.accounts.active.name = Nombre de comptes actifs |
||||
metrics.accounts.active.description = Nombre de comptes vraiment utilisés récemment |
||||
metrics.accounts.active.lastyear = __ACTIVE_USER_YEAR__ |
||||
metrics.accounts.active.lastmonth = __ACTIVE_USER_MONTH__ |
||||
metrics.accounts.active.lastweek = __ACTIVE_USER_WEEK__ |
||||
|
@ -1,23 +1,29 @@
|
||||
#! /bin/bash |
||||
|
||||
TEMPLATE=/srv/xmpp.chapril.org/tools/serviceinfo/template-serviceinfo.json |
||||
TARGET_FILE=/srv/xmpp.chapril.org/experimental/serviceinfo.json |
||||
TEMPLATE=/srv/xmpp.chapril.org/tools/chaprilinfos/template-chaprilinfos.properties |
||||
TARGET_FILE=/srv/chaprilinfos/well-known/xmppchaprilorg.properties |
||||
|
||||
main() { |
||||
cat "${TEMPLATE}" \ |
||||
| sed "s/__USER_QUOTA__/$(get_hard_quota)/" \ |
||||
| sed "s/__UPLOAD_RETENTION__/1y/" \ |
||||
| sed "s/__TOTAL_USER_ACCOUNTS__/$(count_user_accounts)/" \ |
||||
| sed "s/__EJABBERD_VERSION__/$(get_ejabberd_version)/" \ |
||||
| sed "s/__STARTTIME_WEEK__/$(starttime 7)/" \ |
||||
| sed "s/__STARTTIME_MONTH__/$(starttime 30)/" \ |
||||
| sed "s/__STARTTIME_HALFYEAR__/$(starttime 180)/" \ |
||||
| sed "s/__LAST_UPDATE__/$(date -Iminutes)/" \ |
||||
| sed "s/__TOTAL_USER_ACCOUNTS__/$(count_user_accounts)/" \ |
||||
| sed "s/__ACTIVE_USER_WEEK__/$(user_activity 7)/" \ |
||||
| sed "s/__ACTIVE_USER_MONTH__/$(user_activity 30)/" \ |
||||
| sed "s/__ACTIVE_USER_HALFYEAR__/$(user_activity 180)/" \ |
||||
| sed "s/__POSTS_COUNT__/$(count_archived_messages)/" \ |
||||
| sed "s/__ACTIVE_USER_YEAR__/$(user_activity 365)/" \ |
||||
> ${TARGET_FILE} |
||||
|
||||
# | sed "s/__USER_QUOTA__/$(get_hard_quota)/" \ |
||||
# | sed "s/__UPLOAD_RETENTION__/1y/" \ |
||||
# | sed "s/__STARTTIME_WEEK__/$(starttime 7)/" \ |
||||
# | sed "s/__STARTTIME_MONTH__/$(starttime 30)/" \ |
||||
# | sed "s/__STARTTIME_HALFYEAR__/$(starttime 180)/" \ |
||||
# | sed "s/__ACTIVE_USER_WEEK__/$(user_activity 7)/" \ |
||||
# | sed "s/__ACTIVE_USER_MONTH__/$(user_activity 30)/" \ |
||||
# | sed "s/__ACTIVE_USER_HALFYEAR__/$(user_activity 180)/" \ |
||||
# | sed "s/__POSTS_COUNT__/$(count_archived_messages)/" \ |
||||
# | sed "s/__AVG_DISK_USED_PER_USER__/$(TODO)/" \ |
||||
|
||||
} |
||||
|
||||
get_ejabberd_version() { |
@ -1,4 +0,0 @@
|
||||
# ServiceInfo generator |
||||
|
||||
ServiceInfo is a JSON format for publishing meta-data about fediverse-related |
||||
services available on a DNS domain. |
@ -1,82 +0,0 @@
|
||||
{ |
||||
"version": "1.0", |
||||
"id": "https://xmpp.chapril.org/", |
||||
"name": "Messagerie instantanée Chapril", |
||||
"classifiers": ["xmpp", "instant-messaging"], |
||||
"software": { |
||||
"name": "ejabberd", |
||||
"version": "__EJABBERD_VERSION__", |
||||
"repository": "https://github.com/processone/ejabberd/" |
||||
}, |
||||
"organization": { |
||||
"name": "Chapril", |
||||
"contact": "https://www.chapril.org/contact.html" |
||||
}, |
||||
"protocols": [ |
||||
{ |
||||
"name": "xmpp", |
||||
"capabilities": [ |
||||
{ |
||||
"presence": true, |
||||
"mam": true, |
||||
"in-band-registration": true, |
||||
"web-registration": false, |
||||
"storage-quota": "__USER_QUOTA__", |
||||
"upload-autovaccum": "__UPLOAD_RETENTION__", |
||||
"irc-gateway": false |
||||
} |
||||
] |
||||
} |
||||
], |
||||
"otherServices": { |
||||
"outbound": [ |
||||
"irc" |
||||
], |
||||
"inbound": [] |
||||
}, |
||||
"signups": "open", |
||||
"visibilityPreferences": { |
||||
"allowCrawling": true, |
||||
"preferUnlisted": false |
||||
}, |
||||
"metrics": [ |
||||
{ |
||||
"type": "totalUsers", |
||||
"value": __TOTAL_USER_ACCOUNTS__ |
||||
}, |
||||
{ |
||||
"type": "activeUsers", |
||||
"value": __ACTIVE_USER_WEEK__, |
||||
"periodLength": 604800, |
||||
"startTime": "__STARTTIME_WEEK__" |
||||
}, |
||||
{ |
||||
"type": "activeUsers", |
||||
"value": __ACTIVE_USER_MONTH__, |
||||
"periodLength": 2592000, |
||||
"startTime": "__STARTTIME_MONTH__" |
||||
}, |
||||
{ |
||||
"type": "activeUsers", |
||||
"value": __ACTIVE_USER_HALFYEAR__, |
||||
"periodLength": 15552000, |
||||
"startTime": "__STARTTIME_HALFYEAR__" |
||||
}, |
||||
{ |
||||
"type": "localMessages", |
||||
"value": 60640 |
||||
} |
||||
], |
||||
"features": [ |
||||
{ |
||||
"name": "Movim", |
||||
"type": "UI", |
||||
"description": "Web-based XMPP client" |
||||
}, |
||||
{ |
||||
"name": "biboumi", |
||||
"type": "gateway", |
||||
"description": "XMPP->IRC gateway" |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue