i have this script and when i ejecute it, the console tell me this " sintax error line 41 unexpected element "}" "
is the sintaxis ok?
#!/bin/bash
if [ $1 = '' ];then
{
exit 0;
}
if [ $1 = '-s' ]; then
{
sudo /etc/init.d/apache2 start;
sudo /etc/init.d/mysql start;
php5 &
nautilus /var/www;
}
else
{
if [ $1 = '-r' ]; then
{
sudo /etc/init.d/apache2 start;
sudo /etc/init.d/mysql start;
sudo killall php5;
sudo php5 &
}
else
{
if [ $1 = '-s' ]; then
sudo /etc/init.d/apache2 stop;
sudo /etc/init.d/mysql stop;
sudo killall php5;
}
}
echo 'Desea iniciar un nautilus en www?';
read rta;
if [ rta = 'si' ]; then
{
nautilus /var/www ;
}
thanks