38 if ( isset( $args[0] ) && !empty( $args[0] ) && isset( $args[1] ) && !empty( $args[1] ) ) {
42 $syntaxCheckCmd =
null;
46 $port = $bin->getSmtpPort();
50 $port = $bin->getPort();
54 $port = $bin->getPort();
59 $port = $bin->getPort();
64 $port = $bin->getPort();
69 $port = $bin->getPort();
73 $port = $bin->getPort();
76 $name = $bin->getName();
77 $service = $bin->getService();
79 if ( !empty( $service ) && $service instanceof
Win32Service ) {
80 if ( $args[1] == self::CREATE ) {
83 elseif ( $args[1] == self::START ) {
84 $this->
start( $bin, $syntaxCheckCmd );
86 elseif ( $args[1] == self::STOP ) {
87 $this->
stop( $service );
89 elseif ( $args[1] == self::RESTART ) {
90 $this->
restart( $bin, $syntaxCheckCmd );
92 elseif ( $args[1] == self::INSTALL ) {
93 if ( !empty(
$port ) ) {
97 elseif ( $args[1] == self::REMOVE ) {
98 $this->
remove( $service, $name );