Skip to content

Commit

Permalink
fix(elasticsearch): typo in env var
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Sep 19, 2021
1 parent 1286811 commit 77191dc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Password: password

#### Deploy Trudesk Anywhere
**Trudesk** is built with <a href="https://nodejs.org">nodejs</a> and <a href="https://mongodb.org">mongodb</a> and can run on any cloud provider, docker, bare-metal, or even a raspberry pi.
Take it for a spin on Ubuntu 16.04 with a one liner - <br />`curl -L -s https://files.trudesk.io/install/install_ubuntu.sh | sudo bash`
Take it for a spin on Ubuntu 20.04 with a one liner - <br />`curl -L -s https://files.trudesk.io/install/ubuntu.sh | sudo bash`

### Documentation
Online documentation: [https://docs.trudesk.io/docs](https://docs.trudesk.io/docs)
Expand Down
1 change: 0 additions & 1 deletion src/client/containers/Settings/Server/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { updateSetting, updateMultipleSettings } from 'actions/settings'

import Button from 'components/Button'
import SettingItem from 'components/Settings/SettingItem'
import EnableSwitch from 'components/Settings/EnableSwitch'

import helpers from 'lib/helpers'
import axios from 'axios'
Expand Down
2 changes: 1 addition & 1 deletion src/elasticsearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function checkConnection (callback) {
}

ES.testConnection = function (callback) {
if (process.env.ELEASTICSEARCH_URI) ES.host = process.env.ELEASTICSEARCH_URI
if (process.env.ELASTICSEARCH_URI) ES.host = process.env.ELASTICSEARCH_URI
else ES.host = nconf.get('elasticsearch:host') + ':' + nconf.get('elasticsearch:port')

ES.esclient = new elasticsearch.Client({
Expand Down
4 changes: 2 additions & 2 deletions src/install/elasticsearchtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ winston.add(winston.transports.Console, {
level: global.env === 'production' ? 'info' : 'verbose'
})
;(function () {
var ELATICSEARCH_URI = process.env.ELATICSEARCH_URI
if (!ELATICSEARCH_URI) return process.send({ error: { message: 'Invalid connection uri' } })
var ELASTICSEARCH_URI = process.env.ELASTICSEARCH_URI
if (!ELASTICSEARCH_URI) return process.send({ error: { message: 'Invalid connection uri' } })

elasticsearch.testConnection(function (err) {
if (err) {
Expand Down
3 changes: 3 additions & 0 deletions src/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ function mainRoutes (router, middleware, controllers) {
)

router.get('/api/v1/admin/restart', middleware.api, middleware.isAdmin, function (req, res) {
if (process.env.DISABLE_RESTART) return res.json({ success: true })

var pm2 = require('pm2')
pm2.connect(function (err) {
if (err) {
Expand Down Expand Up @@ -398,6 +400,7 @@ function mainRoutes (router, middleware, controllers) {
})

router.get('/debug/restart', function (req, res) {
if (process.env.DISABLE_RESTART) return res.send('RESTART DISABLED')
var pm2 = require('pm2')
pm2.connect(function (err) {
if (err) {
Expand Down

0 comments on commit 77191dc

Please sign in to comment.