mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
553 B

  1. #!/bin/bash
  2. if any_installed "bitlbee" ; then
  3. echo "Adding bitlbee to /etc/inetd.conf"
  4. grep -q bitlbee /etc/inetd.conf || cat >>/etc/inetd.conf<<EOF
  5. #6667 stream tcp nowait bitlbee.bitlbee /usr/sbin/tcpd /usr/sbin/bitlbee # added by ROCK
  6. EOF
  7. fi
  8. if any_removed "bitlbee" ; then
  9. echo "Removing bitlbee from /etc/inetd.conf"
  10. cp /etc/inetd.conf{,.bak.bitlbee.$(date +%Y%m%d%H%M%S)}
  11. tmp="`mktemp`"
  12. rm -f ${tmp}
  13. touch ${tmp}
  14. chmod 600 ${tmp}
  15. grep -v "bitlbee.*# added by ROCK" /etc/inetd.conf >${tmp}
  16. cat ${tmp} > /etc/inetd.conf
  17. rm -f ${tmp}
  18. fi