wildduck/setup/06_install_enable_services.sh

27 lines
737 B
Bash
Raw Normal View History

#! /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
2021-06-25 21:41:25 +08:00
$SYSTEMCTL_PATH enable redis-server.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