Re: Scripts to start and stop services

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Montag, den 12.09.2005, 16:35 +0300 schrieb Dotan Cohen:
> I often need to start/stop sendmail, mysql, and apache at once. I
> tried making a script with this contents:
> #!/bin/sh
> /sbin/service sendmail start
> /sbin/service httpd start
> 
> I put it in ~/bin and chmod 777 it. But I get permission denied when I
> try to run it because I am not root. I understand that I need sudo but
> I have no idea what to do. Anybody?
> 
> Thanks.
> 
> Dotan

1.	Move it into /root/bin/ || /usr/local/bin
2.	The owner should be root and perms 0744
3.	Execute: $ su -c /path/scriptname
3b.	Add an alias for 3.

Sudo is also helpful here of course.


Thomas
 

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux