Installation<\/strong><\/h3>\nFirst of all, you will need to login to your server.<\/p>\n
Download the latest version from their website.<\/p>\n
mkdir BungeeCord\r\ncd BungeeCord\r\nwget http:\/\/ci.md-5.net\/job\/BungeeCord\/lastSuccessfulBuild\/artifact\/bootstrap\/target\/BungeeCord.jar\r\n<\/code><\/pre>\nStart BungeeCoord with Java:<\/p>\n
cd ~\r\ncd BungeeCord\r\njava -Xms512M -Xmx512M -jar BungeeCord.jar\r\n<\/code><\/pre>\n… or with Screen:<\/p>\n
cd ~\r\ncd BungeeCord\r\nscreen -S BungeeCord\r\nscreen -r BungeeCord\r\n[user@ ~screen]$ java -Xms512M -Xmx512M -jar BungeeCord.jar\r\n<\/code><\/pre>\nBungeeCord is setup at this point. You can use the init script below to have it run on boot and perform service commands against it.<\/p>\n
(Optional) Init script<\/strong><\/h3>\nCreate an init.d script.<\/p>\n
nano \/etc\/init.d\/BungeeCord\r\n<\/code><\/pre>\nCopy and paste the init script below. Edit the\u00a0MCPATH='\/root\/BungeeCord'<\/code>\u00a0to the proper install path.<\/p>\n#!\/bin\/bash\r\n # \/etc\/init.d\/BungeeCord\r\n # version 0.3.9 2012-08-13 (YYYY-MM-DD)\r\n\r\n ### BEGIN INIT INFO\r\n # Provides: BungeeCord\r\n # Required-Start: $local_fs $remote_fs\r\n # Required-Stop: $local_fs $remote_fs\r\n # Should-Start: $network\r\n # Should-Stop: $network\r\n # Default-Start: 2 3 4 5\r\n # Default-Stop: 0 1 6\r\n # Short-Description: BungeeCord\r\n # Description: BungeeCord\r\n ### END INIT INFO\r\n\r\n #Settings\r\n SERVICE='BungeeCord.jar'\r\n USERNAME='root'\r\n MCPATH='\/root\/BungeeCord'\r\n INVOCATION=\"java -server -Xmx512M -Dfile.encoding=UTF-8 -jar $SERVICE\"\r\n\r\n ME=`whoami`\r\n as_user() {\r\n if [ $ME = $USERNAME ] ; then\r\n bash -c \"$1\"\r\n else\r\n su - $USERNAME -c \"$1\"\r\n fi\r\n }\r\n\r\n mc_start() {\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"$SERVICE is already running!\"\r\n else\r\n echo \"Starting $SERVICE...\"\r\n cd $MCPATH\r\n as_user \"cd $MCPATH && screen -dmS BungeeCord $INVOCATION\"\r\n sleep 7\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"$SERVICE is now running.\"\r\n else\r\n echo \"Error! Could not start $SERVICE!\"\r\n fi\r\n fi\r\n }\r\n\r\n\r\n mc_stop() {\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"Stopping $SERVICE\"\r\n as_user \"screen -p 0 -S BungeeCord -X eval 'stuff \\\"alert PROXY STOP IN 10 SECONDS.\\\"\\015'\"\r\n sleep 10\r\n as_user \"screen -p 0 -S BungeeCord -X eval 'stuff \\\"end\\\"\\015'\"\r\n sleep 7\r\n else\r\n echo \"$SERVICE was not running.\"\r\n fi\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"Error! $SERVICE could not be stopped.\"\r\n else\r\n echo \"$SERVICE is stopped.\"\r\n fi\r\n }\r\n\r\n mc_update() {\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"Stopping $SERVICE\"\r\n as_user \"screen -p 0 -S BungeeCord -X eval 'stuff \\\"say Proxy SERVER GO TO UPDATE.. RESTARTING IN 10 SECONDS.... \\\"\\015'\"\r\n sleep 10\r\n as_user \"screen -p 0 -S BungeeCord -X eval 'stuff \\\"stop\\\"\\015'\"\r\n sleep 10\r\n as_user \"cd $MCPATH && rm -rf BungeeCord.jar\"\r\n sleep 6\r\n as_user \"cd $MCPATH && wget http:\/\/ci.md-5.net\/job\/BungeeCord\/lastSuccessfulBuild\/artifact\/bootstrap\/target\/BungeeCord.jar\"\r\n else\r\n echo \"$SERVICE was not running.\"\r\n fi\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"Error! $SERVICE could not be UPDATED.\"\r\n else\r\n echo \"$SERVICE is update.\"\r\n fi\r\n }\r\n #Start-Stop here\r\n case \"$1\" in\r\n start)\r\n mc_fupdate\r\n mc_start\r\n ;;\r\n stop)\r\n mc_stop\r\n ;;\r\n restart)\r\n mc_stop\r\n mc_fupdate\r\n mc_start\r\n ;;\r\n update)\r\n mc_update\r\n mc_start\r\n ;;\r\n status)\r\n if pgrep -u $USERNAME -f $SERVICE > \/dev\/null\r\n then\r\n echo \"$SERVICE is running.\"\r\n else\r\n echo \"$SERVICE is not running.\"\r\n fi\r\n ;;\r\n\r\n *)\r\n echo \"Usage: $0 {start|stop|update|status|restart}\"\r\n exit 1\r\n ;;\r\n esac\r\n\r\n exit 0\r\n<\/code><\/pre>\nRegister the service.<\/p>\n
chmod a+x \/etc\/init.d\/BungeeCord\r\nchkconfig --add BungeeCord\r\n<\/code><\/pre>\nYou’re all set, you can use the following commands to control the service.<\/p>\n
service BungeeCord start\r\nservice BungeeCord stop\r\nservice BungeeCord restart\r\nservice BungeeCord update\r\nservice BungeeCord status<\/code><\/pre>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[105,231,243],"manual_kb_tag":[191],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2267"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2267"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2267\/revisions"}],"predecessor-version":[{"id":2268,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2267\/revisions\/2268"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2267"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2267"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}