forked from YunoHost-Apps/synapse_ynh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.json
47 lines (47 loc) · 1.84 KB
/
actions.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[{
"id": "update_turnserver_ip",
"name": "Update turnserver ip",
"command": "/opt/yunohost/matrix-$YNH_APP_INSTANCE_NAME/Coturn_config_rotate.sh",
"user": "root",
"accepted_return_codes": [0],
"description": {
"en": "Update the ip in the turnserver config"
}
},{
"id": "open_turnserver_firewall_ports",
"name": "Open ports for turnserver",
"command": "yunohost firewall allow Both 49153:49193",
"user": "root",
"accepted_return_codes": [0],
"description": {
"en": "Open the ports range 49153:49193 with TCP and UDP to be able to use correctly the turnserver."
}
},{
"id": "close_turnserver_firewall_ports",
"name": "Close ports for turnserver",
"command": "yunohost firewall disallow Both 49153:49193",
"user": "root",
"accepted_return_codes": [0],
"description": {
"en": "Close the ports range 49153:49193 with TCP and UDP. (Undo \"Open ports for turnserver\" action)"
}
},{
"id": "set_admin_user",
"name": "Set a user as admin",
"command": "[[ \"$(su --command=\"psql matrix_synapse\" postgres <<< \"UPDATE users SET admin = 1 WHERE name = '@$YNH_ACTION_USERNAME:$(yunohost app setting $YNH_APP_INSTANCE_NAME special_domain)'\")\" == 'UPDATE 1' ]]",
"user": "root",
"accepted_return_codes": [0],
"description": {
"en": "Set a synapse user as admin in the synapse server. It probably usefull only to manage the community function."
},
"arguments": [
{
"name": "username",
"type": "string",
"ask": {
"en": "username of the user to set as admin"
},
"example": "bob"
}
]
}]