Confluence init.d Skrip zum starten auf ein Linux System (debian, Ubuntu 9.10)
Anbei ein init.d Skript für das automatische starten von Confluence
- #!/bin/bash
- # Confluence startup script
- # Based on script at http://www.bifrost.org/problems.html
- ### BEGIN INIT INFO
- # Provides: atlassian-confluence
- # Required-Start: $syslog
- # Should-Start:
- # Required-Stop: $syslog
- # Should-Stop:
- # Default-Start: 3 5
- # Default-Stop: 0 1 2 6
- # Short-Description: Atlassian Confluence - The Enterprise WIKI System
- # Description: @8090 Starts the WIKI System from Atlassian
- ### END INIT INFO
- RUN_AS_USER=confluence
- CATALINA_HOME=/home/atlassian/confluence
- start() {
- echo "Starting Confluence: "
- chmod 777 /home/atlassian/confluence/logs/catalina.out
- if [ "x$USER" != "x$RUN_AS_USER" ]; then
- su - $RUN_AS_USER -c "$CATALINA_HOME/bin/startup.sh"
- else
- $CATALINA_HOME/bin/startup.sh
- fi
- echo "done."
- #tail -f "$CATALINA_HOME/logs/catalina.out" &
- }
- stop() {
- echo "Shutting down Confluence: "
- if [ "x$USER" != "x$RUN_AS_USER" ]; then
- su - $RUN_AS_USER -c "$CATALINA_HOME/bin/shutdown.sh"
- else
- $CATALINA_HOME/bin/shutdown.sh
- fi
- echo "done."
- }
- case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- sleep 10
- #echo "Hard killing any remaining threads.."
- #kill -9 `cat $CATALINA_HOME/work/catalina.pid`
- start
- ;;
- *)
- echo "Usage: $0 {start|stop|restart}"
- esac
- exit 0
Ensuring Confluence is started at boot time:
- Make sure the Confluence script is executable by running the command:
sudo chmod +x /etc/init.d/confluence
- Add the Confluence start up script to the required run levels by running the command:
sudo update-rc.d confluence defaults 8089 (as in this example above, usually)
sudo update-rc.d confluence defaults 80 - Start Confluence now using the command:
sudo /etc/init.d/confluence start
To be completely sure that it has worked, reboot your server and try accessing Confluence using your web browser by going to http://localhost:8090/ Hopefully, Confluence will have auto started.
