File: batch-example

package info (click to toggle)
mon 1.2.0-9
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,860 kB
  • ctags: 538
  • sloc: perl: 15,847; ansic: 774; sh: 330; makefile: 46
file content (20 lines) | stat: -rwxr-xr-x 294 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# an example of calling moncmd in batch mode
#
# $Id: batch-example,v 1.1.1.1 2004/06/09 05:18:07 trockij Exp $
#
trap "stty echo && echo && exit" 2

echo -n "Password: "
stty -echo
read p
echo
stty echo

cat <<EOF | moncmd -a
USER=monuser
PASS=$p
list failures
enable host xyz
EOF