1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
# postfix if ! grep '^relayhost' /etc/postfix/main.cf; then cat >> /etc/postfix/main.cf <<EOF # altnode auto configuration relayhost = [192.168.1.7] EOF service postfix restart ||: fi # rsync-server if ! grep '^\[pub\]' /etc/rsyncd.conf; then cat >> /etc/rsyncd.conf <<EOF # altnode auto configuration [pub] path=/var/ftp/pub #use chroot read only list EOF chkconfig rsync on fi if ! grep '^\[altnode\]' /etc/rsyncd.conf; then cat >> /etc/rsyncd.conf <<EOF # altnode auto configuration [altnode] path=/var/ftp/altnode use chroot read only list EOF chkconfig rsync on fi # ftpd chkconfig vsftpd on ||: if grep 'only_from = 127.0.0.1' /etc/xinetd.conf; then sed -i -e 's,only_from = .*,only_from = 0.0.0.0,' /etc/xinetd.conf fi service xinetd restart service monit restart ||: