How to start Fisheye and Crucible at boot time

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

Fisheye and Crucible do not ship with scripts to start Fisheye at system boot time.

System Administration tasks are not supported by Atlassian. These instructions are only provided as a guide and may not be up to date with the latest version of your operating system.

Windows

With a system administrator user, configure a scheduled task to start the instance when the server starts. When prompted to browse for a program, select <FishEye Home Directory>\bin\start.bat.

Linux

  1. Create a new file /etc/init.d/fisheye with the following contents:

    /etc/init.d/fisheye
    #!/bin/bash
    
    # RUN_AS: The user to run fisheye as. Its recommended that you create a separate user account for security reasons
    RUN_AS=fisheye
    
    # FISHEYE_HOME: The path to the FishEye installation. It's recommended to create a symbolic link to the latest version so 
    # the process will still work after upgrades. Be sure to update the symlink itself when upgrading.
    # Example: ln -s /usr/local/atlassian/applications/fisheye/4.2.0 /usr/local/atlassian/applications/fisheye/latest
    FISHEYE_HOME="/usr/local/atlassian/applications/fisheye/latest"
    
    # FISHEYE_INST: The path to store Fisheye data.
    # The line below should be uncommented only if you don't have the environment variables set in /etc/environment file.
    # export FISHEYE_INST="/path/to/fisheye_inst"
    fisheyectl() {
            if [ "x$USER" != "x$RUN_AS" ]; then 
                    su - "$RUN_AS" -c "$FISHEYE_HOME/bin/fisheyectl.sh $1" 
            else 
                    "$FISHEYE_HOME/bin/fisheyectl.sh" "$1"
            fi
    }
    
    case "$1" in 
            start)
                    fisheyectl start
                    ;;
            stop)
                    fisheyectl stop
                    ;;
            restart)
                    fisheyectl stop 
                    sleep 10
                    fisheyectl start
                    ;;
            *)
                    echo "Usage: $0 {start|stop|restart}"
    esac 
    
    exit 0
  2. Change the permissions as follows:

    sudo chmod 755 /etc/init.d/fisheye
  3. Add the script to the start up process:
    1. Ubuntu (and other Debian derivatives):

      sudo update-rc.d fisheye defaults
      Adding system startup for /etc/init.d/FishEye ...
         /etc/rc0.d/K20FishEye -> ../init.d/FishEye
         /etc/rc1.d/K20FishEye -> ../init.d/FishEye
         /etc/rc6.d/K20FishEye -> ../init.d/FishEye
         /etc/rc2.d/S20FishEye -> ../init.d/FishEye
         /etc/rc3.d/S20FishEye -> ../init.d/FishEye
         /etc/rc4.d/S20FishEye -> ../init.d/FishEye
         /etc/rc5.d/S20FishEye -> ../init.d/FishEye
    2. RHEL and derivates:

      chkconfig --add fisheye --level 0356

This will make the instance start automatically when the server is started.

This script has four usage options: StartDebugStatus and Stop.

  • Start is executed by default on server boot.
  • Debug will start the instance with extra debugging information in the logs.
  • Status will tail the logs.
  • Stop will shutdown the instance.

 

 

Did it work? 
To double check if this worked, after rebooting the server, wait a few seconds / minutes to give the Fisheye instance enough time to start and try to reach the instance using a browser from another computer.

注意

This was tested with Ubuntu 8.10.

最終更新日 2018 年 7 月 31 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.