(no commit message) origin/HEAD origin/master
authorAaron Parecki <aaron@parecki.com>
Fri, 20 Mar 2015 19:36:10 +0000 (12:36 -0700)
committerAaron Parecki <aaron@parecki.com>
Fri, 20 Mar 2015 19:36:10 +0000 (12:36 -0700)
init-script [new file with mode: 0644]
start.sh [new file with mode: 0644]

diff --git a/init-script b/init-script
new file mode 100644 (file)
index 0000000..12019d9
--- /dev/null
@@ -0,0 +1,8 @@
+# This file goes in something like
+# /etc/init/service-name
+
+start on runlevel [2345]
+stop on runlevel [016]
+
+respawn
+exec sudo -u www /full/path/to/start.sh >> /var/log/worker.log 2>&1
diff --git a/start.sh b/start.sh
new file mode 100644 (file)
index 0000000..8554047
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+cd /web/example.com/scripts
+/usr/bin/php /web/example.com/scripts/run.php