Skip to content

Commit

Permalink
Merge pull request #2633 from RestyaPlatform/issue/2216
Browse files Browse the repository at this point in the history
Fixes #2216: Dynamic password change for admin user issue fixed
  • Loading branch information
S. Sivachidambaram authored May 29, 2019
2 parents 490b278 + 9c46f31 commit 521dfc5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
21 changes: 21 additions & 0 deletions Jelastic/jelastic_password.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* To update password first time in Jelastic
*
* PHP version 5
*
* @category PHP
* @package Restyaboard
* @subpackage Core
* @author Restya <[email protected]>
* @copyright 2014 Restya
* @license http://restya.com/ Restya Licence
* @link http://restya.com/
*/
require_once '/var/www/webroot/ROOT/server/php/config.inc.php';
require_once '/var/www/webroot/ROOT/server/php/libs/core.php';
$password = $argv[1];
$result = pg_query_params($db_lnk, 'UPDATE users SET password = $1 WHERE username = $2', array(
getCryptHash($password),
'admin'
));
4 changes: 3 additions & 1 deletion Jelastic/restyaboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ onInstall:
- cmd [postgres9]: curl -v -L -G -o /tmp/restyaboard_with_empty_data.sql https://raw.githubusercontent.com/RestyaPlatform/board/master/sql/restyaboard_with_empty_data.sql
- cmd [postgres9]: printf "PGPASSWORD=${nodes.postgres9.password};\nexport PGPASSWORD;\npsql postgres webadmin -c \"CREATE DATABASE restyaboard;\"\npsql -h ${nodes.postgres9.address} -d restyaboard -U webadmin < /tmp/restyaboard_with_empty_data.sql;\n" > /tmp/createDb
- cmd [postgres9]: chmod +x /tmp/createDb && /tmp/createDb
success: Installation completed. username admin and password restya
- cmd [nginxphp]: curl -v -L -G -o /var/www/webroot/ROOT/server/php/shell/jelastic_password.php https://raw.githubusercontent.com/RestyaPlatform/board/dev/Jelastic/jelastic_password.txt
- cmd [nginxphp]: php /var/www/webroot/ROOT/server/php/shell/jelastic_password.php ${user.appPassword}
success: Installation completed. username admin and password ${user.appPassword}

0 comments on commit 521dfc5

Please sign in to comment.