Bash script to start/stop LAMP on GECKO static Plasma.
Beginner with help from this forum now has a LAMP stack on Gecko Static Plasma (and a WAMP on Win10Pro using Uniserver Zero.)
Seeking a way to reliably start/stop the services ... but I do have them enabled so this might be a moot point ... asking anyway to get opinions/suggestions. Have used the WAMP version with its integrated simple controller having form control buttons to start/stop Apache and MySQL etc. Found this old post ... showing a bash script to do something similar but more basic. https://www.linuxquestions.org/quest...-mysql-625028/ Wondering if this post is the way to go with my Leap 15.2 Gecko. Not used bash scripts and so unsure how to proceed. Am imagining that I will be making "unforced errors" and will likely need to stop and restart on a regular basis. Would like to at least get that bit correct and reliable so that I can learn about actually getting my database started. LAMP is default setup as per Leap Wiki. |
No, that thread from 2008 isn't applicable. Since the apache and mysql are enabled they will automatically start at boot so it really isn't necessarily to do anything else. Starting or stopping is as easy as
systemctl start service_name or systemctl stop service_name or systemctl restart service_name |
Thank you - michaelk.
Have been using those commands but as I come from Windows and MS Access am used to being able to create my own forms and controls and click buttons ! And being new to Linux have been amazed how much typing happens for things done by gui buttons in Windows. Thanks for advice on that old post. |
With linux the desktop runs on top of the operating system instead of integrated like Windows. There are few GUI tools but in most cases are just what we call wrappers that actually use the command line utilities. webmin is a GUI web based system administration tool. For MySQL there is MySQL workbench.
|
Quote:
Very simple to create your won GUI wrappers around commands. Have a look at yad, for example. Quote:
|
Thank you - michaelk & ondoho.
Good information, thanks. Am now looking at "YAD". Want to post a new question about best practice, setups, virtual etc so will end this conversation and start a new one with a better title. Paul |
For service start and stop there is a portable "front end" command that translates to the actual implementation.
Code:
service service_name start BTW some services take a "soft" restart Code:
service service_name reload Code:
systemctl enable service_name Code:
systemctl list-unit-files Code:
systemctl cat service_name |
Thank you - MadeInGermany
Help appreciated. Paul |
All times are GMT -5. The time now is 07:43 PM. |