-
Notifications
You must be signed in to change notification settings - Fork 0
/
runandtest.sh
executable file
·47 lines (32 loc) · 958 Bytes
/
runandtest.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# PATH=$PATH:/
# export PATH
host_name=`cat /etc/hostname`
# CHANGE-ME
# variable pointing to the directory containig this file
# remove trailing '/' character at the end
# INIT_DIR=/Users/fernandosainz/Desktop/drupal-contentuploader-master
# INIT_DIR="/opt/test/drupal-contentuploader"
INIT_DIR="/opt/voa3r"
# this aprox doesnt detect machine changes
# if [ ! -f "${INIT_DIR}/$0" ]; then
if [ "${host_name}" = "rrm" -a "${INIT_DIR}" = "/opt/voa3r" ]; then
#if [ "${host_name}" = "rrm" -a "${INIT_DIR}" = "/opt/test/drupal-contentuploader" ]; then
echo -n ""
else
echo "Edit this file and change the INIT_DIR variable. Then re-run it"
return 1
fi
lockfile="${INIT_DIR}/harvested_files/nivel_0/.stored"
execscript="${INIT_DIR}/PortalUpdater/script/execute_portalUpdater.sh"
res1=0
res2=0
if [ -f ${lockfile} ];then
rm ${lockfile}
res1=$?
fi
if [ -x ${execscript} ];then
${execscript}
res2=$?
fi
return $res1 && $res2