Wrote a very simple script to manually start apache and mysql when i really need it.
What script is doing is starting apache and mysql and pops a message that everything has been started.
#!/bin/bashstart can be changed on stop or restart, depends on why you need this scirpt for
sudo service apache2 start
sudo service mysql start
zenity --info --text 'Apache and MySQL has been started sucessfully!'
Please note that in order for this to run correctly with no password you have to modify /etc/sudoers
The part that you need looks like this.
# Cmnd alias specification* Change screatch on your username
Cmnd_Alias HTTPD = /etc/init.d/apache2, /var/init.d/mysql
# User privilege specification
root ALL=(ALL) ALL
screatch ALL=NOPASSWD: HTTPD
Also please note that this is my first ever script so i will be glad to hear any complaints and advices.