diff --git a/shellbox_from_db b/shellbox_from_db index 32608f4..ca24f74 100755 --- a/shellbox_from_db +++ b/shellbox_from_db @@ -5,7 +5,7 @@ # a configuration file for the shellbox service. # Create/update /etc/shellbox.d/.conf files # -# $Id: shellbox_from_db,v 1.2 2014/05/21 11:17:31 kapeller Exp $ +# $Id: shellbox_from_db,v 1.3 2014/05/22 07:22:35 kapeller Exp $ # $Source: /cvs/G/EPICS/App/scripts/shellbox_from_db,v $ ############################################################################### # @@ -66,7 +66,9 @@ if (wget -qO $tmpfile https://inventory.psi.ch/soap/softioc_info.aspx?host=$host echo "### EOF" >> $new_file if (! cmp -s $new_file $old_file); then subject="SoftIOC #$port on $hostname has changed" - diff -u $new_file $old_file | mail -s "$subject" $email + if [ -e $old_file ]; then + diff -u $new_file $old_file | mail -s "$subject" $email + fi cp $new_file $old_file fi fi