- umask 022
- chmod 0700 $GPG_HOME
- echo Generating request in $REQUEST_FILE
- rm -f $REQUEST_FILE
-
- # Header
- cat > $REQUEST_FILE <<EOF
-From: $CONTACT
-To: sysbackup@carnet.hr
-Subject: Backup za $HOST
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="$BOUNDARY"
-
-This is a message with multiple parts in MIME format.
---$BOUNDARY
-Content-Type: text/plain
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline
-
-Ime posluzitelja: $HOST
-IP adresa: $IP
-Kontakt adresa: $CONTACT
-EOF
-
-# attachment: disk sizes
-cat >> $REQUEST_FILE <<EOF
---$BOUNDARY
-Content-Type: text/plain
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline; filename="df.txt.gpg"
-
-EOF
-
- df -h | $GPG >> $REQUEST_FILE
-
-# attachment: database sizes
-if [ -d /var/lib/mysql -o -d /var/lib/postgresql ]; then
- cat >> $REQUEST_FILE <<EOF
---$BOUNDARY
-Content-Type: text/plain
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline; filename="db.txt.gpg"
-
-EOF