Expand cli commands
-
It would be very nice if you could expand the list of laragon's cli commands with:
- stop a single service
laragon stop apache
orlaragon stop mysql
orlaragon stop
(stop all) - start a single service
laragon start apache
orlaragon start mysql
orlaragon start
(start all) - change package versions (php, apache, mysql)
laragon switch php "php-version-directory"
I did a test by changing the value of
[php] Version = php-xxx
directly inlaragon.ini
and launching the commandlaragon reload
orlaragon reload apache
, but php remains in the previous version until I click onreload
button in the main window aside the apache version, even though the notification above the clock shown that the apache service has been restarted.I hope my feedback can help you to improve this great app.
- stop a single service
-
@risingphoenix : Many thanks for your suggestions. I will add them to my TODO list
-
I'm trying to do the same as OP, but I experience a different issue.
The script below works as intended, except that it pauses when runninglaragon reload apache
.
An extra Laragon icon then shows up in my system tray.
When I click the new icon, the "Apache Reloaded!" message appears, and the script continues running.
I'm using Laragon Full 4.0.14 on Windows 10.@echo off SET version=%1 SET VC=14 :: Set Apache and PHP version IF %version%==7.1 ( SET version=7.1.5 ) ELSE ( IF %version%==7.2 ( SET version=7.2.16 SET VC=15 ) ELSE ( IF %version%==7.3 ( SET version=7.3.3 SET VC=15 ) ELSE ( IF %version%==5.6 ( SET version=5.6.40 SET VC=11 ) ELSE ( echo Unknown version %version% EXIT /B 1 ) ) ) ) SET PHP_VERSION=php-%version%-Win32-VC%VC%-x64 SET APACHE_VERSION=httpd-2.4.35-win64-VC15 IF %VC%==14 SET APACHE_VERSION=httpd-2.4.27-win64-VC14 IF %VC%==11 SET APACHE_VERSION=httpd-2.4.38-win64-VC11 :: Update laragon.ini SET INI_PATH=%laragon_root%\usr\laragon.ini sed -e "s/Version=php-.*/Version=%PHP_VERSION%/g" -e "s/Version=httpd-.*/Version=%APACHE_VERSION%/g" %INI_PATH% > %INI_PATH%.tmp mv %INI_PATH%.tmp %INI_PATH% :: Restart Laragon %laragon_root%\laragon reload apache :: Reload environment variables %laragon_root%\bin\laragon\laragon EXIT /B 0