
Appendix 259
DONE
INDEX
INDEX
user=`whoami`
#---------------------------
# prepare the email message:
#---------------------------
MSG="\n\
Caution:\n\
The magnet of the spectrometer $INSTRUMENT \n\
has an helium level of $LEVEL % \n\
which is less than the limit of $LIMIT %: \n\
Please order liquid helium and refill this magnet.\n\
\n\
This email is automatically send from $MYSELF (user $USER) \n\
on $HOST to:\n\
- $ADDRESSES\n\
"
#-----------------
# mail the message:
#-----------------
echo -e $MSG|$MAIL -s "$INSTRUMENT : Helium refill" $ADDRESSES
exit 0
4. Modify the settings of "ADDRESSES" and "INSTRUMENT" and the text in
the example as you like
5. Click File → Save as
6. Go in the installation directory of T
OPSPIN (default is /opt/topspin) into
the subdirectory prog/bin and save the file as heliumwarn
Now the defined email addresses will get a notification if the actual helium level
is the same or below the entry (in %) in the file
<TOPSPIN_HOME>/conf/instr/<spect>/heliumlimit
The notifications are sent only once but the procedure will be activated again if
the helium level is again higher than the limit.
Note that this script is only an example, if you would like to add more recipients
to the notification list you had to add the respective addresses, if you like to have
less addresses you have to delete the respective entries.
Comentários a estes Manuais