]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
template script: use bash and require ed 2516/head
authorJason Ish <ish@unx.ca>
Thu, 19 Jan 2017 15:28:45 +0000 (09:28 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 24 Jan 2017 09:53:37 +0000 (10:53 +0100)
For now these scripts only work in bash, and the "ed" program
is required.

scripts/setup-app-layer-detect.sh
scripts/setup-app-layer-logger.sh
scripts/setup-app-layer.sh

index ef4bccaa8e9fc12995aed8c1b2770981ad0556b3..8127370962eb41faab627cc9ecafc58a5a303a1f 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /usr/bin/env bash
 #
 # Script to provision a new application layer detector and parser.
 
index 51f8e6d105f1b55c101e7a81cc50685d0d0e19c4..f05be59a286756b75df2c8d20a35f105ef4d35e3 100755 (executable)
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /usr/bin/env bash
 
 set -e
 
index 87cebab80085a93a2411098198149c61fc85a07e..f7fa1ba6709ed58f71ca27d48217bed8c12965cc 100755 (executable)
@@ -1,10 +1,16 @@
-#! /bin/sh
+#! /usr/bin/env bash
 #
 # Script to provision a new application layer detector and parser.
 
 set -e
 #set -x
 
+# Fail if "ed" is not available.
+if ! which edx > /dev/null 2>&1; then
+    echo "error: the program \"ed\" is required for this script"
+    exit 1
+fi
+
 function usage() {
     cat <<EOF