aboutsummaryrefslogtreecommitdiffstats
path: root/.openshift
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-04 20:05:15 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-09-04 20:05:15 +0200
commit1a05696a84808a7877fe52846110da77ef245c47 (patch)
tree14147da1bd16497d748a110cd1a5e7fd0c3136ba /.openshift
parentadfc748bfa724ad8cc9d4ebf6f9d095fc56fb936 (diff)
downloadvolse-hubzilla-1a05696a84808a7877fe52846110da77ef245c47.tar.gz
volse-hubzilla-1a05696a84808a7877fe52846110da77ef245c47.tar.bz2
volse-hubzilla-1a05696a84808a7877fe52846110da77ef245c47.zip
Updating OpenShift deploy script
Diffstat (limited to '.openshift')
-rwxr-xr-x.openshift/action_hooks/deploy24
1 files changed, 24 insertions, 0 deletions
diff --git a/.openshift/action_hooks/deploy b/.openshift/action_hooks/deploy
index 51e0f6d94..688871d72 100755
--- a/.openshift/action_hooks/deploy
+++ b/.openshift/action_hooks/deploy
@@ -136,3 +136,27 @@ ln -sf ${OPENSHIFT_DATA_DIR}.htaccess ${OPENSHIFT_REPO_DIR}.htaccess
echo ".htaccess symlink created"
####
+
+echo "Check for the poller at .openshift/cron/minutely/poller , if not created - create it"
+
+if [ ! -f ${OPENSHIFT_REPO_DIR}.openshift/cron/minutely/poller ]; then
+printf '%s\n' '#!/bin/bash' 'if [ ! -f $OPENSHIFT_DATA_DIR/last_run ]; then' ' touch $OPENSHIFT_DATA_DIR/last_run' 'fi' 'if [[ $(find $OPENSHIFT_DATA_DIR/last_run -mmin +4) ]]; then #run every 5 mins' ' rm -f $OPENSHIFT_DATA_DIR/last_run' ' touch $OPENSHIFT_DATA_DIR/last_run' ' # The command(s) that you want to run every 5 minutes' 'cd /var/lib/openshift/${OPENSHIFT_APP_UUID}/app-root/repo; /opt/rh/php54/root/usr/bin/php include/poller.php' 'fi' >${OPENSHIFT_REPO_DIR}.openshift/cron/minutely/poller
+echo "Done creating file .openshift/cron/minutely/poller"
+
+else
+
+echo "The poller already exists"
+
+fi
+
+####
+
+# Set permissions on the poller script to make it executable.
+
+echo "Now chmod 777 -R poller"
+
+chmod -R 777 ${OPENSHIFT_REPO}.openshift/cron/minutely/poller
+
+echo "chmod done, permissions set to 777 on poller script."
+
+####