Author: sevein
Date: Thu Dec 15 15:02:37 2011
New Revision: 10407

Log:
Add logging to the upstart script

Modified:
   trunk/init/qubit-sword.conf

Modified: trunk/init/qubit-sword.conf
==============================================================================
--- trunk/init/qubit-sword.conf Thu Dec 15 00:03:23 2011        (r10406)
+++ trunk/init/qubit-sword.conf Thu Dec 15 15:02:37 2011        (r10407)
@@ -26,17 +26,18 @@
 script
 
   USER="www-data"
+  LOGFILE="/tmp/qubit-sword.log"
 
-  /bin/su -c 'php \
-                 -d memory_limit=-1 \
-                 -d error_log="syslog" \
-                 -d error_reporting="E_ALL" \
-                   /var/www/ica-atom/symfony \
-                     gearman:worker \
-                       --config=sword \
-                       --application=qubit \
-                       --connection=propel \
-                       --timeout=-1 \
-                       --count=0' ${USER}
+  # Running sudo twice permits the output redirection, fix this
+  sudo sudo -u ${USER} php \
+      -d memory_limit=-1 \
+      -d error_reporting="E_ALL" \
+          /var/www/ica-atom/symfony \
+              gearman:worker \
+                  --config=sword \
+                  --application=qubit \
+                  --connection=propel \
+                  --timeout=-1 \
+                  --count=0 >> ${LOGFILE} 2>&1
 
 end script

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to