z.B. inid "xinetd sshd" restart.
Wenn kein zweiter Parameter angegeben wird, startet er den Dienst:
z.B. inid xinetd
#!/bin/sh
# inid 1.0
# (C) 2004 D. Jansen
# published under the GNU GPL 3.0
# for a copy see http://www.gnu.org/copyleft/gpl.html
if [ $# != 1 ] && [ $# != 2 ] ; then
echo Error: $# arguments given, but must be 1 or 2.
echo "Please put braces around the services if multiple."
echo ex. \#inid \"gpm apache cupsys\" stop;
exit 1;
fi
if [ $2 ]; then
arg=$2
else
arg=start
fi
for daemons in $1;
do
if [ -e /etc/init.d/$daemons ]; then
sudo /etc/init.d/$daemons $arg;
# you can use ". " instead of "sudo "
# if you only use it as root
else
echo /etc/init.d/$daemons not found!
fi
done
{ 0 komentar... read them below or add one }
Post a Comment
Come on share your comment, but please do not spam