File: notify.tpl

package info (click to toggle)
raccess4vbox3 0.2.8.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,008 kB
  • ctags: 34
  • sloc: tcl: 703; sh: 155; makefile: 125
file content (31 lines) | stat: -rwxr-xr-x 792 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
#
# This script used as callhandler in raccess.conf uses vboxputty to notify
# You by phonecall if vbox received a new message.
# The user running the vbox3 needs to be allowed to use vboxputty with sudo
# add a line similar to the following to /etc/sudoers
#
# <user>	<hostname>=NOPASSWD: /usr/sbin/vboxputty
#
# Add a section for the phonenumber $NOTIFY in the user's vboxrc similar to
# this
#
# [CALLERID]
# 017000000	notify	Notify
#
# [NOTIFY]
# *	*	donothing.tcl	1	4	4
#
# use the 2nd numeric value to adjust the number of rings before giveup.

NOTIFY=017000000

FILE=$1
WHO=$2
ID=$3
USER=$4

# this does the standard delivery by vboxmail                
|BIN_DIR|/vboxmail "$FILE" "$WHO" "$ID" "$USER"

exec /usr/bin/sudo /usr/sbin/vboxputty -d /dev/ttyI2 -c $NOTIFY -x FULL