0

Hi, I'm trying to run my script but is not working for some reason the functions is not working at all.
Anyone willing to help me to find out the error.
Thank you.

#!/bin/bash

DATE=$(date +"%m_%d_%Y");

turn_off_services()
{
  echo -e "\n## Remove unnecessary services" 

  ## Turn off unnecessary services
  ## chkconfig --list |egrep -i "iptables|smartd|kudzu|bluetooth|rpcgssd"

  chkconfig iptables off
  chkconfig smartd off
  chkconfig kudzu off
  chkconfig bluetooth off
  chkconfig rpcgssd off

  chkconfig --list |egrep -i "iptables|smartd|kudzu|bluetooth|rpcgssd"
  echo "done."
}
2
Contributors
2
Replies
15
Views
4 Years
Discussion Span
Last Post by toldav
1

hi,

where, in your script, do you call the function?

it is declared, but you don't seem to call it.

Edited by Watael

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.