aboutsummaryrefslogtreecommitdiff
path: root/mail/popfile/files/setup-popfile.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mail/popfile/files/setup-popfile.sh')
-rw-r--r--mail/popfile/files/setup-popfile.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/mail/popfile/files/setup-popfile.sh b/mail/popfile/files/setup-popfile.sh
new file mode 100644
index 000000000000..aa0fce9e9483
--- /dev/null
+++ b/mail/popfile/files/setup-popfile.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# setup-popfile.sh: a script for setup popfile instance
+# $FreeBSD$
+#
+
+ask_noyes()
+{
+ local key
+
+ echo -n "$1 [y/N]: "
+ read key
+ case "$key" in
+ [Yy]*)
+ return 0;;
+ *)
+ return 1;;
+ esac
+}
+
+echo "This script will 1) create 'popfile' directory and 2) setup 'popfile' directory for your popfile instance."
+if ask_noyes "Are you ready?"; then
+ mkdir ./popfile
+ if [ -d ./popfile ]; then
+ cp -R __DATADIR__/* ./popfile
+ fi
+ echo "done."
+else
+ echo "Stopped."
+ exit 1
+fi