mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-05 23:51:53 +08:00
88ee4c9ede
Fixed two issues: 82: need to install npm globally to get around permission problems 83: need to start nginx service before restarting it Better executable requirements (lsof, ps). It may be not installed on minimal systems. Better service detection on given port. It is especially useful, if the installation.sh got interrupted for some reason, and already installed some services. Minor doc update, so a single line is required to paste in terminal. curl vs. wget -> stayed with wget, it is installed by default on ubuntu Colors: added color support for the terminal output:)
25 lines
693 B
Bash
25 lines
693 B
Bash
#! /bin/bash
|
|
|
|
OURNAME=06_install_enable_services.sh
|
|
|
|
echo -e "\n-- Executing ${ORANGE}${OURNAME}${NC} subscript --"
|
|
|
|
NODE_PATH=`command -v node`
|
|
SYSTEMCTL_PATH=`command -v systemctl`
|
|
|
|
SRS_SECRET=`pwgen 12 -1`
|
|
DKIM_SECRET=`pwgen 12 -1`
|
|
ZONEMTA_SECRET=`pwgen 12 -1`
|
|
DKIM_SELECTOR=`$NODE_PATH -e 'console.log(Date().toString().substr(4, 3).toLowerCase() + new Date().getFullYear())'`
|
|
|
|
$SYSTEMCTL_PATH enable mongod.service
|
|
|
|
echo -e "\n-- These are the installed and required programs:"
|
|
node -v
|
|
redis-server -v
|
|
mongod --version
|
|
echo "HOSTNAME: $HOSTNAME"
|
|
|
|
echo -e "-- Installing ${RED}npm globally${NC} (workaround)"
|
|
# See issue https://github.com/nodemailer/wildduck/issues/82
|
|
npm install npm -g
|