Skip to content

Instantly share code, notes, and snippets.

@deviantintegral
Created April 1, 2014 20:58
Show Gist options
  • Save deviantintegral/9923055 to your computer and use it in GitHub Desktop.
Save deviantintegral/9923055 to your computer and use it in GitHub Desktop.
$ sudo git diff
diff --git a/init.d/redis-server b/init.d/redis-server
index b235e8d..c14faef 100755
--- a/init.d/redis-server
+++ b/init.d/redis-server
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash -ex
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog $remote_fs
@@ -12,6 +12,10 @@
### END INIT INFO
+# Redirect stdout ( > ) into a named pipe ( >() ) running "tee"
+exec > >(tee -a /tmp/redis.log)
+exec 2>&1
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/redis-server
DAEMON_ARGS=/etc/redis/redis.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment