[Asterisk-Dev] patch for addmailbox
Karl Putland
karl at putland.linux-site.net
Fri Apr 25 23:19:27 MST 2003
Lets you specify a mailbox as first arg to the script
Index: addmailbox
===================================================================
RCS file: /usr/cvsroot/asterisk/addmailbox,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 addmailbox
--- addmailbox 12 Feb 2003 13:59:13 -0000 1.1.1.1
+++ addmailbox 26 Apr 2003 06:32:05 -0000
@@ -1,8 +1,13 @@
#!/bin/sh
VMHOME=/var/spool/asterisk/vm
SNDHOME=/var/lib/asterisk/sounds
-echo -n "Enter mailbox number: "
-read mailbox
+if [ -z $1 ]
+then
+ echo -n "Enter mailbox number: "
+ read mailbox
+else
+ mailbox=$1
+fi
mkdir -p ${VMHOME}/${mailbox}
mkdir -p ${VMHOME}/${mailbox}/INBOX
cat ${SNDHOME}/vm-theperson.gsm > ${VMHOME}/${mailbox}/unavail.gsm
--
Karl Putland <karl at putland.linux-site.net>
More information about the asterisk-dev
mailing list