Usage of Other scripts

Describes the usage pf scripts of ProSync Manager.

1. Start/Shutdown ProSync Manager

The prosyncmanager script can start, stop, and check the status and version of ProSync Manager.

Usage

$ prosyncmanager [COMMAND] [OPTION]
COMMAND
Description

help

Displays the required pre-requisites and commands and usage examples.

start

Starts the ProSyncManager. Starts the container in case of adding the with-docker option if repoDB is installed through the install script.

stop

Stops the ProSyncManager. Stops the container in case of adding the with-docker option if repoDB is installed through the install script.

status

Get the status of ProSyncManager's backend/frontend server and repoDB.

version

Get the version of ProSyncManager's backend/frontend server.

Usage example

help

The prosyncmanager help shows the users how to use the script

$ ./prosyncmanager help
###############################
  pre-requisite:
   1. PRSMGR_HOME
    ex) export PRSMGR_HOME=`pwd`
   2. intall.cfg
    will use repoDB_dockername for starting docker container
###############################
  commands:
   help - show commands
    prosyncmanager help
   start - start prosyncmanager
    prosyncmanager start [with-docker]
   stop - stop prosyncmanager
    prosyncmanager stop [with-docker]
   status - check BE/FE/RepoDB status
    prosyncmanager status
   version - get BE/FE version
    prosyncmanager version
###############################

start

Starts ProSync Manager. When adding the with-docker OPTION, start the repoDB container if it was installed via the install script.

$ ./prosyncmanager start
Using CATALINA_BASE:   /path/to/prsmgr_home/installation/apache-tomcat
Using CATALINA_HOME:   /path/to/prsmgr_home/installation/apache-tomcat
Using CATALINA_TMPDIR: /path/to/prsmgr_home/installation/apache-tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/jdk1.8.0_311
Using CLASSPATH:       /path/to/prsmgr_home/installation/apache-tomcat/conf:/path/to/prsmgr_home/installation/apache-tomcat/lib/*:/path/to/prsmgr_home/installation/apache-tomcat/bin/bootstrap.jar:/path/to/prsmgr_home/installation/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Using CATALINA_PID:    /path/to/prsmgr_home/installation/apache-tomcat/temp/tomcat.pid
Tomcat started.
prosyncmanager started

stop

Stops ProSyncManager. When adding the with-docker OPTION, terminate the container if repoDB was installed via the install script.

$ ./prosyncmanager stop
Using CATALINA_BASE:   /path/to/prsmgr_home/installation/apache-tomcat
Using CATALINA_HOME:   /path/to/prsmgr_home/installation/apache-tomcat
Using CATALINA_TMPDIR: /path/to/prsmgr_home/installation/apache-tomcat/temp
Using JRE_HOME:        /usr/lib/jvm/jdk1.8.0_311
Using CLASSPATH:       /path/to/prsmgr_home/installation/apache-tomcat/conf:/path/to/prsmgr_home/installation/apache-tomcat/lib/*:/path/to/prsmgr_home/installation/apache-tomcat/bin/bootstrap.jar:/path/to/prsmgr_home/installation/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Using CATALINA_PID:    /path/to/prsmgr_home/installation/apache-tomcat/temp/tomcat.pid
Tomcat stopped.
prosyncmanager stopped

status

Get the status of ProSyncManager's backend/frontend server and repoDB.

$ ./prosyncmanager status
server ... not ok
prsmgr_web ... not ok
repoDB ... ok

version

Retrieves the version of the ProSyncManager's backend/frontend server.

$ ./prosyncmanager version
server ... {
  "commit": "9da481d5",
  "tag": "v4.2",
  "mergeRequest": "!60",
  "buildTime": "2025-04-28T03:12:23Z"
}
prsmgr_web ... {
  "commit": "2a8e0f5",
  "tag": "4.1",
  "mergeRequest": "!14",
  "buildTime": "2025-04-28T03:12:30Z"
}


2. Reset the users password

The users can use the ResetPassword.sh provided by ProSyncManager to reset the password for a specific account.

The tool must perform with java 8 as the environment.

Usage

$ ./ResetPassword.sh --dbuser [dbuser] --dbpassword [dbpassword] --dbname [dbname] --host [host] --port [port] --target [target]

The following describes each parameter.

Parameters
Description

dbuser

DBuser of the repoDB, the REPODB_USERNAME value of install.cfg used during installation.

dbpassword

Password required to connect to the repoDB, the REPODB_PASSWORD value of install.cfg used during installation.

dbname

repoDB's dbname, the REPODB_DBNAME value of install.cfg used during installation.

host

The ip of the repoDB to connect to, the REPODB_IP value of install.cfg used during installation.

port

The port of the repoDB to connect to, the REPODB_PORT value of install.cfg used during installation.

target

The ID of the user the users want to initialize.

Usage example (reset password for user named 'admin')

$ sudo ./ResetPassword.sh --dbuser repo_user --dbpassword password --dbname prosyncmanager --host 192.1.3.112 --port 13852 --target admin
Running command: java -jar /home/mujin_gwak/develop/prsmanager/prosyncmanager/installation/repodb/Resetter.jar --dbuser "repo_user" --dbpassword "password" --dbname "prosyncmanager" --host "192.1.3.112" --port "13852" --target "admin"
This app is running on Unix
Password updated successfully!
Reset completed, new password is set for admin.
Password: 17]x;Vi1aMI,
Please change the password after login.


3. Change repo DB user and password

Describes the process of changing the user and password of REPO DB.

3.1. ProSync Manager Exit

For shutdown-related commands, refer to Starting/Shutting Down ProSync Manager.

3.2. Command for password change

Connect to the REPO DB and perform the password change alter syntax.

The users can access it through the command below, and enter the value of REPODB_PASSWORD set in install.cfg in the password field when entering the command.

docker exec -it {REPODB_DOCKERNAME} psql -U {REPODB_USERNAME} {REPODB_DBNAME}
Password for user repo_user: {REPODB_PASSWORD}

The SQL to change the password is as follows. Enter a new password {REPODB_PASSWORD}

alter user {REPODB_USERNAME} with password '{REPODB_PASSWORD}'

3.3. Modify the prosyncmanager.properties file

The prosyncmanager.properties file contains the user and password information of the REPO DB that ProSyncManager will use. The users need to modify this information to match the changed password.

# $PRSMGR_HOME/prosyncmanager.properties
...
# REPO DB
REPODB_USERNAME={REPODB_USERNAME}
REPODB_PASSWORD={REPODB_PASSWORD} # Enter changed password here
REPODB_IP={REPODB_IP}
REPODB_PORT={REPODB_PORT}
REPODB_DBNAME={REPODB_DBNAME}
...

3.4. Start ProSync Manager

For startup-related commands, refer to Start/Shut Down ProSyncManager.

Last updated