forked from YunoHost-Apps/synapse_ynh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
actions.toml
33 lines (29 loc) · 1.36 KB
/
actions.toml
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
[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 = "Update the ip in the turnserver config"
[open_turnserver_firewall_ports]
name = "Open ports for turnserver"
command = "yunohost firewall allow Both 49153:49193"
user = "root"
accepted_return_codes = [0]
description = "Open the ports range 49153:49193 with TCP and UDP to be able to use correctly the turnserver."
[close_turnserver_firewall_ports]
name = "Close ports for turnserver"
command = "yunohost firewall disallow Both 49153:49193"
user = "root"
accepted_return_codes = [0]
description = "Close the ports range 49153:49193 with TCP and UDP. (Undo \"Open ports for turnserver\" action)"
[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 server_name)'\")\" == 'UPDATE 1' ]]"
user = "root"
accepted_return_codes = [0]
description = "Set a synapse user as admin in the synapse server. It is mainly required to manage the community function."
[set_admin_user.arguments]
[set_admin_user.arguments.username]
type = "string"
ask = "username of the user to set as admin"
example = "bob"