summaryrefslogtreecommitdiff
path: root/maintenance/hiphop/run-server
blob: 2d71b8712e1f8e2f893ff5d2c8c9d29ebea6c314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/hhvm -f
<?php

require __DIR__ . '/../Maintenance.php';

class RunHipHopServer extends Maintenance {
	function __construct() {
		parent::__construct();
	}

	function execute() {
		global $IP;

		passthru(
			'cd ' . wfEscapeShellArg( $IP ) . " && " .
			wfEscapeShellArg(
				'hhvm',
				'-c', __DIR__."/server.conf",
				'--mode=server',
				'--port=8080'
			),
			$ret
		);
		exit( $ret );
	}
}
$maintClass = 'RunHipHopServer';
require_once RUN_MAINTENANCE_IF_MAIN;