This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Use the default packaged mcrouter instance for local installs

  • Loading branch information...
bsimpson63 committed Feb 28, 2017
1 parent 864681b commit 67338d58fba2bc7d9e8cc4a5a960711ddb42a834
Showing with 12 additions and 14 deletions.
  1. +12 −0 install/setup_mcrouter.sh
  2. +0 −14 upstart/reddit-mcrouter-global.conf
View
@@ -94,3 +94,15 @@ if [ ! -f /etc/mcrouter/global.conf ]; then
}
MCROUTER
fi
+
+# this file is sourced by the default mcrouter upstart config, see
+# /etc/init/mcrouter.conf
+cat > /etc/default/mcrouter <<MCROUTER_DEFAULT
+MCROUTER_FLAGS="-f /etc/mcrouter/global.conf -L /var/log/mcrouter/mcrouter.log -p 5050 -R /././ --stats-root=/var/mcrouter/stats"
+MCROUTER_DEFAULT
+
+# set an upstart override so mcrouter starts when reddit starts
+echo "start on networking or reddit-start" > /etc/init/mcrouter.override
+
+# restart mcrouter to read the updated config
+service mcrouter restart
@@ -1,14 +0,0 @@
-description "Memcache protocol router for scaling Memcached deployments."
-
-start on networking or starting reddit-paster
-stop on runlevel [!2345]
-
-respawn
-respawn limit 10 5
-
-setuid Debian-mcrouter
-setgid Debian-mcrouter
-
-script
- exec /usr/bin/mcrouter -f /etc/mcrouter/global.conf -R /././ -p 5050 --stats-root=/var/mcrouter/stats
-end script

0 comments on commit 67338d5

Please sign in to comment.