mirror of
https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh.git
synced 2024-09-03 19:46:01 +02:00
Testing (#19)
* use app action set_admin_user * get install working by waiting for theuser to be created before calling the app action
This commit is contained in:
parent
18f5ccb1ad
commit
ff01ce573d
1 changed files with 4 additions and 2 deletions
|
@ -391,11 +391,13 @@ ynh_script_progression --message="Starting a systemd service..." --time --weight
|
|||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start"
|
||||
# Wait until the synapse user is created
|
||||
sleep 30
|
||||
# (Note that, by default, non-admins might not have your homeserver's permission to create communities.)
|
||||
if [ "$bot_is_synapse_admin" = "Yes" ]
|
||||
then
|
||||
ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = '@$whatsappbot:$server_name';"
|
||||
# yunohost app action run $synapse_instance set_admin_user -a username=$whatsappbot
|
||||
# ynh_psql_execute_as_root --database=$synapse_db_name --sql="UPDATE users SET admin = 1 WHERE name = '@$whatsappbot:$server_name';"
|
||||
yunohost app action run $synapse_instance set_admin_user -a username=$whatsappbot
|
||||
fi
|
||||
ynh_systemd_action --service_name=$app --action="restart"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue