Multiple scripts have been bundled with the installer to accomplish a proper installation of Bitbucket Server and to control the application in the target environment. Here's a brief description of the scope and responsibilities of each one of them.

* install_linux_service.sh
  A script to install/uninstall the Bitbucket service in Linux environments. During installation it will add a script on /etc/init.d/ and link it to RunLevels 2, 3, 4 and 5.

* setup_user.sh
 A script which creates/deletes an account on unix environments and gives it the necessary access to use the Bitbucket home and installation directories. This script is used to create an account which is used when Bitbucket is installed as a service.

* setup_user.bat
 A script which creates/deletes an account on Windows environments. This script is used to create an account which is used when Bitbucket is installed as a service.

* set_service_owner.bat
 A script which configures an account on Windows environments as the 'Log on as' account in a Service.

* ntrights.exe
  A utility provided by Microsoft (but not distributed by Windows) which allows us to configure an account to have SeServiceLogonRight right. With this configuration the account can be used as the 'Log on as' account for a service.

* control_service.bat
  A script which is used during the installation to run the Bitbucket Server and Bitbucket Elasticsearch services in Windows environments

* shutdown_bundled_jre.bat
  A script used by the Start Bitbucket Windows menu icon when Bitbucket Server has NOT been installed as a Service.

* start_service.bat
  A script used by the Start Bitbucket Windows menu icon when Bitbucket Server has been installed as a Service.

* startup_bundled_jre.bat
  A script used by the Stop Bitbucket Windows menu icon when Bitbucket Server has NOT been installed as a Service.

* stop_service.bat
  A script used by the Stop Bitbucket Windows menu icon when Bitbucket Server has been installed as a Service.
