Make managix scripts properly executable
Most of the scripts managix was using were missing the shebang at the beginning of the script.
This can be problematic if one uses a shell besides bash. This patch fixes that.
Change-Id: Ie7722f832d0d25bec049e123a0ed1570d0aeb650
Reviewed-on: https://asterix-gerrit.ics.uci.edu/286
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Raman Grover <ramangrover29@gmail.com>
diff --git a/asterix-events/src/main/resources/events/file/create_file.sh b/asterix-events/src/main/resources/events/file/create_file.sh
index 762a2d3..dbec6b4 100644
--- a/asterix-events/src/main/resources/events/file/create_file.sh
+++ b/asterix-events/src/main/resources/events/file/create_file.sh
@@ -1,3 +1,5 @@
+#!/usr/bin/env bash
+
mkdir -p $1
echo "touch $1/$2" >> ~/file_create.log
touch $1/$2
diff --git a/asterix-events/src/main/resources/events/file/delete.sh b/asterix-events/src/main/resources/events/file/delete.sh
index a6673e2..c9399f9 100644
--- a/asterix-events/src/main/resources/events/file/delete.sh
+++ b/asterix-events/src/main/resources/events/file/delete.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
#/*
# Copyright 2009-2013 by The Regents of the University of California
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#*/
+
PATH_TO_DELETE=$1
echo "rm -rf $PATH_TO_DELETE" >> ~/backup.log
rm -rf $PATH_TO_DELETE
diff --git a/asterix-events/src/main/resources/events/file/dir_copy.sh b/asterix-events/src/main/resources/events/file/dir_copy.sh
index bac2f32..8273c6a 100755
--- a/asterix-events/src/main/resources/events/file/dir_copy.sh
+++ b/asterix-events/src/main/resources/events/file/dir_copy.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
#/*
# Copyright 2009-2013 by The Regents of the University of California
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#*/
+
USERNAME=$1
SRC_HOST=$2
SRC_DIR=$3
diff --git a/asterix-events/src/main/resources/events/file/dir_transfer.sh b/asterix-events/src/main/resources/events/file/dir_transfer.sh
index 6818149..6fbbcee 100644
--- a/asterix-events/src/main/resources/events/file/dir_transfer.sh
+++ b/asterix-events/src/main/resources/events/file/dir_transfer.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
#/*
# Copyright 2009-2013 by The Regents of the University of California
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#*/
+
USERNAME=$1
DIR_TO_TRANSFER=$2
DEST_HOST=$3
diff --git a/asterix-events/src/main/resources/events/file/transfer.sh b/asterix-events/src/main/resources/events/file/transfer.sh
index 8b5dfa3..b7dd5f7 100644
--- a/asterix-events/src/main/resources/events/file/transfer.sh
+++ b/asterix-events/src/main/resources/events/file/transfer.sh
@@ -1,3 +1,4 @@
+#!/usr/bin/env bash
#/*
# Copyright 2009-2013 by The Regents of the University of California
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#*/
+
+
USERNAME=$1
FILE_TO_TRANSFER=$2
DEST_HOST=$3