do not assume env var HOST_INDEX begins with 'host' (#174)

diff --git a/provider/lib/active.js b/provider/lib/active.js
index cbc5017..980473b 100644
--- a/provider/lib/active.js
+++ b/provider/lib/active.js
@@ -24,7 +24,7 @@
                 return;
             }
 
-            var redundantHost = utils.host === 'host0' ? 'host1' : 'host0';
+            var redundantHost = utils.host === `${utils.hostPrefix}0` ? `${utils.hostPrefix}1` : `${utils.hostPrefix}0`;
             var activeHost = query === 'true' ? utils.host : redundantHost;
             if (utils.activeHost !== activeHost) {
                 if (utils.redisClient) {
diff --git a/provider/lib/utils.js b/provider/lib/utils.js
index 1256d59..808beb4 100644
--- a/provider/lib/utils.js
+++ b/provider/lib/utils.js
@@ -16,7 +16,8 @@
     this.routerHost = process.env.ROUTER_HOST || 'localhost';
     this.worker = process.env.WORKER || 'worker0';
     this.host = process.env.HOST_INDEX || 'host0';
-    this.activeHost = 'host0'; //default value on init (will be updated for existing redis)
+    this.hostPrefix = this.host.replace(/\d+$/, '');
+    this.activeHost = `${this.hostPrefix}0`; //default value on init (will be updated for existing redis)
     this.db = triggerDB;
     this.redisClient = redisClient;
     this.redisKey = redisKeyPrefix + '_' + this.worker;
@@ -462,7 +463,7 @@
                 .then(() => {
                     process.on('SIGTERM', function onSigterm() {
                         if (self.activeHost === self.host) {
-                            var redundantHost = self.host === 'host0' ? 'host1' : 'host0';
+                            var redundantHost = self.host === `${self.hostPrefix}0` ? `${self.hostPrefix}1` : `${self.hostPrefix}0`;
                             self.redisClient.hsetAsync(self.redisKey, self.redisField, redundantHost)
                             .then(() => {
                                 self.redisClient.publish(self.redisKey, redundantHost);