> For the complete documentation index, see [llms.txt](https://docs.tibero.com/prosyncmanager.en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tibero.com/prosyncmanager.en/prosync-manager-manual/installation-guide/installation/script-usage.md).

# Usage of Other scripts

Describes the usage pf scripts of ProSync Manager.

## 1. Start/Shutdown ProSync Manager&#x20;

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

{% hint style="warning" %}
**Caution**

The PRSMGR\_HOME environment variable must be set to the directory path where prosyncmanager.properties is located.

```sh
export PRSMGR_HOME={PROSYNCMANAGER_INSTALLATION_PATH}
export PATH=$PATH:$JAVA_HOME/bin:$PRSMGR_HOME:$CATALINA_HOME/bin
```

{% endhint %}

### Usage

```sh
$ prosyncmanager [COMMAND] [OPTION]
```

<table><thead><tr><th width="100">COMMAND</th><th>Description</th></tr></thead><tbody><tr><td>help</td><td>Displays the required pre-requisites and commands and usage examples.</td></tr><tr><td>start</td><td>Starts the ProSyncManager. Starts the container in case of adding the with-docker option if repoDB is installed through the install script.</td></tr><tr><td>stop</td><td>Stops the ProSyncManager. Stops the container in case of adding the with-docker option if repoDB is installed through the install script.</td></tr><tr><td>status</td><td>Get the status of ProSyncManager's backend/frontend server and repoDB.</td></tr><tr><td>version</td><td>Get the version of ProSyncManager's backend/frontend server.</td></tr></tbody></table>

### Usage example

#### help

The `prosyncmanager help` shows the users how to use the script&#x20;

```sh
$ ./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.

```sh
$ ./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.

```sh
$ ./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.

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

#### version

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

```sh
$ ./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.&#x20;

The tool must perform with java 8 as the environment.

{% hint style="warning" %}
**Caution**

Only users with superuser/administrator privileges on the host machine can use the Password Reset Tool to reset passwords for regular and administrator accounts.
{% endhint %}

### Usage

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

The following describes each parameter.

<table><thead><tr><th width="128">Parameters</th><th>Description</th></tr></thead><tbody><tr><td>dbuser</td><td>DBuser of the repoDB, the REPODB_USERNAME value of install.cfg used during installation.</td></tr><tr><td>dbpassword</td><td>Password required to connect to the repoDB, the REPODB_PASSWORD value of install.cfg used during installation.</td></tr><tr><td>dbname</td><td>repoDB's dbname, the REPODB_DBNAME value of install.cfg used during installation.</td></tr><tr><td>host</td><td>The ip of the repoDB to connect to, the REPODB_IP value of install.cfg used during installation.</td></tr><tr><td>port</td><td>The port of the repoDB to connect to, the REPODB_PORT value of install.cfg used during installation.</td></tr><tr><td>target</td><td>The ID of the user the users want to initialize.</td></tr></tbody></table>

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

```sh
$ 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.
```

{% hint style="warning" %}
**Caution**

It is recommended that the users change the password to a new one after resetting it, as the reset password is only provided once.
{% endhint %}

###

***

## 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](#id-1.-start-shutdown-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.

```sh
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}&#x20;

```sh
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.

```sh
# $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&#x20;

For startup-related commands, refer to [Start/Shut Down ProSyncManager](#id-1.-start-shutdown-prosync-manager).

###
