# # check amanda accounts # if [ -z "`grep ^amanda /etc/group`" ]; then groupadd -g 211 amanda fi if [ -z "`grep ^amanda /etc/passwd`" ]; then useradd -u 211 -g 211 -G disk -d /var/lib/amanda -s /bin/bash -c "Amanda Backup Account" amanda mkdir -p /var/lib/amanda/gnutar-lists echo "export PATH=/usr/sbin:\$PATH" >> /var/lib/amanda/.profile chown -R amanda:amanda /var/lib/amanda fi # # Check inetd.conf entries # if [ -z "`grep ^amandaidx /etc/inetd.conf`" ]; then echo "#" >> /etc/inetd.conf echo "# Amanda server services" >> /etc/inetd.conf echo "amandaidx stream tcp nowait amanda /usr/libexec/amanda/amindexd amindexd -auth=bsdtcp amdump amindexd amidxtaped" >> /etc/inetd.conf echo "amidxtape stream tcp nowait amanda /usr/libexec/amanda/amidxtaped amidxtaped -auth=bsdtcp amdump amindexd amidxtaped" >> /etc/inetd.conf echo "# Amanda client service" >> /etc/inetd.conf echo "amanda stream tcp nowait amanda /usr/libexec/amanda/amandad amandad -auth=bsdtcp amdump amindexd amidxtaped" >> /etc/inetd.conf kill -HUP $( pidof inetd ) fi