Project

General

Profile

« Previous | Next » 

Revision aa79a721

Added by Ermal LUÇI almost 15 years ago

More fixes to openvpn to catch up with latest changes.

View differences:

usr/local/www/status_services.php
131 131
			break;
132 132
		case 'openvpn':
133 133
			$vpnmode = $_GET['vpnmode'];
134
			if (($vpnmode == "server") or ($vpnmode == "client")) {
134
			if (($vpnmode == "server") || ($vpnmode == "client")) {
135 135
				$id = $_GET['id'];
136 136
				if (is_numeric($id)) {
137
					$configfile = $g['varetc_path'] . "/openvpn_{$vpnmode}{$id}.conf";
138
					mwexec_bg("/usr/local/sbin/openvpn --config $configfile");
137
					$configfile = "{$g['varetc_path']}/openvpn/{$vpnmode}{$id}.conf";
138
					mwexec_bg("/usr/local/sbin/openvpn --config {$configfile}");
139 139
				}
140 140
			}
141 141
			break;
......
188 188
			if (($vpnmode == "server") or ($vpnmode == "client")) {
189 189
				$id = $_GET['id'];
190 190
				if (is_numeric($id)) {
191
					$pidfile = $g['varrun_path'] . "/openvpn_{$vpnmode}{$id}.pid";
191
					$pidfile = "{$g['varrun_path']}/openvpn_{$vpnmode}{$id}.pid";
192 192
					killbypid($pidfile);
193 193
				}
194 194
			}
......
197 197
			stop_service($_GET['service']);
198 198
			break;
199 199
	}
200
	$savemsg = sprintf(gettext("%s has been stopped."),$_GET['service']);
200
	$savemsg = sprintf(gettext("%s has been stopped."), $_GET['service']);
201 201
	sleep(5);
202 202
}
203 203

  

Also available in: Unified diff