My first shell script

colored-man
Well, after installing arch linux, i had to install the usual tools i need to get my work done, one of these tools is the localhost server that consists of apache,mysql,php … etc, So what i love about arch linux that is i control everything, i don’t want the apache and mysql deamons running all the time or start when the OS starts, it makes the boot time longer, so as i’ve used to, i run the deamons when i need them then turn them off afterwards. To prove to myself that i am smart “lol!” i decided to write a shell script that allows me to start, restart or stop those services easily, and yay i did it !

op=$1
if [[ "$op" = "start" ]]
then
    sudo systemctl start mysqld
    sudo systemctl start httpd
    echo "Web server started..."
elif [[ "$op" = "restart" ]]
then
    sudo systemctl restart mysqld
    sudo systemctl restart httpd
    echo "Web server has been restarted..."
elif [[ "$op" = "stop" ]]
then
    sudo systemctl stop mysqld
    sudo systemctl stop httpd
    echo "Web server stopped..."
else
    echo "Wrong argument, add one of these argument after
webserver.sh: start, restart or stop. eg: ./webserver.sh start"
fi

the script is pretty easy, it just consists of some conditions and the variable that should be written after the script name. It gives an error when the user doesn’t write any operation to be done. It’s not a sophisticated script but as a first script, i like it very much 😀

Finally, GDG Sohag launched

eslam_gdg_orientation

Under the title “General Orientation” the first GDG Sohag event “meeting” was held at a seminar hall in Sohag University. Great topics were discuessed, mainly we talked about: Google, GDG, Google Maps, Google Apps, G+, Android, Developers, APIs. aobut 40 of beautiful ambitious youth attended the event, they were interactive and ready to learn. I want to give a big THANKS to GDG members who helped to organize and brought success to this day: Muhammad Khalaf,  Eslam Muhammad, Amr Zaki and Sara Marey.

Don’t forget to take a look and +1 [our page on G+], also you can explore a [wide varity of pictures] captured by Sara.

to keep in touch and know more, make sure to subscribe to our [mail list], stay tuned 🙂