Explorar el Código

fix .zabbix-cli_auth_token

yalh76 hace 1 año
padre
commit
5633f5c4da
Se han modificado 2 ficheros con 2 adiciones y 0 borrados
  1. 1 0
      scripts/install
  2. 1 0
      scripts/upgrade

+ 1 - 0
scripts/install

@@ -89,6 +89,7 @@ yunohost user create "$zabbix_username" --fullname "${zabbix_username//_}" --dom
 ynh_add_config --template="zabbix-cli_default.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
 /usr/share/zabbix-cli/bin/zabbix-cli --config /usr/share/zabbix-cli/zabbix-cli.toml create_user $zabbix_username --firstname $zabbix_username --lastname $zabbix_username --passwd $zabbix_password --role superadmin --groups 7
 ynh_add_config --template="zabbix-cli.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
+ynh_secure_remove --file="/usr/share/zabbix-cli/.zabbix-cli_auth_token"
 
 #sso integration activation
 $mysqlconn -e "UPDATE \`config\` SET \`http_auth_enabled\` = '1', \`http_login_form\` = '1' WHERE \`config\`.\`configid\` = 1;"

+ 1 - 0
scripts/upgrade

@@ -76,6 +76,7 @@ if [ ! -d "/usr/share/zabbix-cli" ]; then
     /usr/share/zabbix-cli/bin/zabbix-cli --config /usr/share/zabbix-cli/zabbix-cli.toml create_user $zabbix_username --firstname $zabbix_username --lastname $zabbix_username --passwd $zabbix_password --role superadmin --groups 7
     disable_admin_user
     ynh_add_config --template="zabbix-cli.toml" --destination="/usr/share/zabbix-cli/zabbix-cli.toml"
+    ynh_secure_remove --file="/usr/share/zabbix-cli/.zabbix-cli_auth_token"
 fi
 
 #=================================================