mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Small fix
This commit is contained in:
parent
aa6e05fcc4
commit
d7dbe9f70b
5 changed files with 14 additions and 12 deletions
|
@ -79,7 +79,7 @@ adduser turnserver ssl-cert
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Fixing database type..."
|
ynh_script_progression "Fixing database type..."
|
||||||
|
|
||||||
ynh_psql_execute_as_root \
|
ynh_psql_db_shell \
|
||||||
<<< "update pg_database set datcollate='C', datctype='C' where datname='$db_name';"
|
<<< "update pg_database set datcollate='C', datctype='C' where datname='$db_name';"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -203,8 +203,8 @@ fi
|
||||||
|
|
||||||
# WARNING : theses command are used in INSTALL, UPGRADE
|
# WARNING : theses command are used in INSTALL, UPGRADE
|
||||||
# For any update do it in all files
|
# For any update do it in all files
|
||||||
ynh_replace __APP__ "$app" ../hooks/post_cert_update
|
ynh_replace --match=__APP__ --replace="$app" --file=../hooks/post_cert_update
|
||||||
ynh_replace __DOMAIN__ "$domain" ../hooks/post_cert_update
|
ynh_replace --match=__DOMAIN__ --replace="$domain" --file=../hooks/post_cert_update
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
|
|
|
@ -21,7 +21,7 @@ ynh_script_progression "Stopping and removing the systemd service"
|
||||||
|
|
||||||
ynh_config_remove_systemd
|
ynh_config_remove_systemd
|
||||||
|
|
||||||
ynh_config_remove_systemd"$app"-coturn
|
ynh_config_remove_systemd "$app"-coturn
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
|
|
@ -24,7 +24,7 @@ adduser turnserver ssl-cert
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Fixing database type..."
|
ynh_script_progression "Fixing database type..."
|
||||||
|
|
||||||
ynh_psql_execute_as_root \
|
ynh_psql_db_shell \
|
||||||
<<< "update pg_database set datcollate='C', datctype='C' where datname='$db_name';"
|
<<< "update pg_database set datcollate='C', datctype='C' where datname='$db_name';"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -372,8 +372,8 @@ set_permissions data
|
||||||
|
|
||||||
# WARNING : theses command are used in INSTALL, UPGRADE
|
# WARNING : theses command are used in INSTALL, UPGRADE
|
||||||
# For any update do it in all files
|
# For any update do it in all files
|
||||||
ynh_replace __APP__ "$app" ../hooks/post_cert_update
|
ynh_replace --match=__APP__ --replace="$app" --file=../hooks/post_cert_update
|
||||||
ynh_replace __DOMAIN__ "$domain" ../hooks/post_cert_update
|
ynh_replace --match=__DOMAIN__ --replace="$domain" --file=../hooks/post_cert_update
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD SERVICES
|
# RELOAD SERVICES
|
||||||
|
|
|
@ -5,17 +5,19 @@ set -eu
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
app=__APP__
|
app=__APP__
|
||||||
|
YNH_APP_BASEDIR=/etc/yunohost/apps/"$app"
|
||||||
|
YNH_HELPERS_VERSION=2.1
|
||||||
|
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --key=db_name)
|
||||||
db_user=$(ynh_app_setting_get --app=$app --key=db_user)
|
db_user=$(ynh_app_setting_get --key=db_user)
|
||||||
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
db_pwd=$(ynh_app_setting_get --key=db_pwd)
|
||||||
server_name=$(ynh_app_setting_get --app=$app --key=server_name)
|
server_name=$(ynh_app_setting_get --key=server_name)
|
||||||
|
|
||||||
if [ -z ${1:-} ]; then
|
if [ -z ${1:-} ]; then
|
||||||
echo "Usage: set_admin_user.sh user_to_set_as_admin"
|
echo "Usage: set_admin_user.sh user_to_set_as_admin"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ynh_psql_execute_as_root --database=$db_name --sql="UPDATE users SET admin = 1 WHERE name = '@$1:$server_name'"
|
ynh_psql_db_shell --database=$db_name --sql="UPDATE users SET admin = 1 WHERE name = '@$1:$server_name'"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue