Replace /etc.init.d with service

This commit is contained in:
Joe Haig
2016-10-22 22:02:39 +01:00
parent 5f748c4b84
commit 58bd439b4d
5 changed files with 19 additions and 18 deletions

View File

@@ -26,7 +26,7 @@ function DisplayHostAPDConfig(){
} elseif( isset($_POST['StartHotspot']) ) {
if (CSRFValidate()) {
$status->addMessage('Attempting to start hotspot', 'info');
exec( 'sudo /etc/init.d/hostapd start', $return );
exec( 'sudo service hostapd start', $return );
foreach( $return as $line ) {
$status->addMessage($line, 'info');
}
@@ -36,7 +36,7 @@ function DisplayHostAPDConfig(){
} elseif( isset($_POST['StopHotspot']) ) {
if (CSRFValidate()) {
$status->addMessage('Attempting to stop hotspot', 'info');
exec( 'sudo /etc/init.d/hostapd stop', $return );
exec( 'sudo service hostapd stop', $return );
foreach( $return as $line ) {
$status->addMessage($line, 'info');
}