Pager Macros
The macros in the sample pager_macros.cfg configuration file below are for paging and emergency messaging.
///////////////////////////////////////////////////////////////////////////////
//
// pager_macros.cfg -- emergency messaging
//
///////////////////////////////////////////////////////////////////////////////
shout(M, H) // wall a message to just the piktmaster system,
// nowhere else
// (M) is the message (e.g., $msg, or "fire!")
// (H) is the hour (e.g., =always, or =offhours(#now()))
#if piktmaster
if (H)
doexec wait "=echo '(M)' | =wall"
fi
#else
=piktnullchar
#endif
///////////////////////////////////////////////////////////////////////////////
page(M, R, H) // send a page message (M) to recipients (pager phone alias)
// (R) but only during hours (H), and only if =etcdir/nopage
// and tmp/nopage don't exist (i.e., 'touch /pikt/etc/nopage'
// or 'touch /tmp/nopage' will block all paging)
// sample use: =page($host is sick/down, =pagesysadmins, =allhours(#now()))
if ! -e "=etcdir/nopage" && ! -e "/tmp/nopage"
if (H)
doexec wait "=echo '(M)' | =mailx -a 'From: piktadmin' -s '(M)' (R)"
#if piktmaster
=shout((M), =always)
#endif
fi
fi
///////////////////////////////////////////////////////////////////////////////
#ifdef pikttest
allpager =piktadmin // brahms\@acme.com
tomaspager =piktadmin // brahms\@acme.com
#elsifdef debug
allpager =piktadmin // brahms\@acme.com
tomaspager =piktadmin // brahms\@acme.com
#elsedef
allpager emergency\@acme.com
tomaspager 1234567890\@pagemail.net
#endifdef
///////////////////////////////////////////////////////////////////////////////
piktadminpager pikt-emergency\@acme.com
// work-emergency\@acme.com
pagesysadmins =piktadminpager
pagetest =piktadmin
=piktadminpager
///////////////////////////////////////////////////////////////////////////////
For more examples, see Samples.