Skip to content

Instantly share code, notes, and snippets.

@ymkjp
Last active April 18, 2017 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymkjp/b6269e7e43f49a948859a636b7926739 to your computer and use it in GitHub Desktop.
Save ymkjp/b6269e7e43f49a948859a636b7926739 to your computer and use it in GitHub Desktop.
FishEye and Crucible
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: Fecru
# Required-Start: atl-init-40-product
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start Fecru daemon at boot time
### END INIT INFO
# THIS SCRIPT HAS BEEN CONFIGURED TO RUN AS PART OF RUN LEVELS 2 TO 5
# IF YOU WISH TO CHANGE THIS CONFIGURATION YOU WILL HAVE TO DO IT MANUALLY
FISHEYE_INST="/opt/atlassian/fecru/fecru-4.4.0"
RUN_AS="atlfecru"
start() {
sudo -u ${RUN_AS} "${FISHEYE_INST}/bin/start.sh"
}
stop() {
sudo -u ${RUN_AS} "${FISHEYE_INST}/bin/stop.sh"
}
status() {
if PID=$(pgrep -u ${RUN_AS} -f fisheyeboot.jar)
then
echo "Fecru is running (Process ID: ${PID})"
else
echo "Fecru is not running"
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
restart)
stop && start
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
@mumkissqing
Copy link

这是什么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment