Sequence of installation
This commit is contained in:
parent
974ba8742e
commit
50d936e73b
|
@ -291,13 +291,25 @@ function install_smilodon {
|
||||||
groupadd smilodon
|
groupadd smilodon
|
||||||
useradd -c "Smilodon system account" -d $SMILODON_PATH -m -r -g smilodon smilodon
|
useradd -c "Smilodon system account" -d $SMILODON_PATH -m -r -g smilodon smilodon
|
||||||
|
|
||||||
|
SMILODON_ONION_HOSTNAME=$(add_onion_service smilodon 80 ${SMILODON_ONION_PORT})
|
||||||
|
|
||||||
|
if [ ! $SMILODON_SECRET_KEY ]; then
|
||||||
|
SMILODON_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)$(create_password 30)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export smilodon_domain_name=$SMILODON_ONION_HOSTNAME
|
||||||
|
export secret_key='$SMILODON_SECRET_KEY'
|
||||||
|
export mongodb_username='smilodon'
|
||||||
|
export mongodb_password='$SMILODON_ADMIN_PASSWORD'
|
||||||
|
export smilodon_admin_address=$MY_EMAIL_ADDRESS
|
||||||
|
export MAIL_SERVER='localhost'
|
||||||
|
export MAIL_PORT=25
|
||||||
|
|
||||||
function_check install_mongodb
|
function_check install_mongodb
|
||||||
install_mongodb smilodon
|
install_mongodb smilodon
|
||||||
|
|
||||||
smilodon_create_database
|
smilodon_create_database
|
||||||
|
|
||||||
SMILODON_ONION_HOSTNAME=$(add_onion_service smilodon 80 ${SMILODON_ONION_PORT})
|
|
||||||
|
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
if [ ! "$?" = "0" ]; then
|
if [ ! "$?" = "0" ]; then
|
||||||
echo $'Unable to install smilodon dependencies'
|
echo $'Unable to install smilodon dependencies'
|
||||||
|
@ -319,14 +331,9 @@ function install_smilodon {
|
||||||
nginx_ensite smilodon
|
nginx_ensite smilodon
|
||||||
systemctl enable mongodb
|
systemctl enable mongodb
|
||||||
systemctl restart mongodb
|
systemctl restart mongodb
|
||||||
systemctl restart nginx
|
|
||||||
|
|
||||||
chown -R smilodon:smilodon ${SMILODON_PATH}
|
chown -R smilodon:smilodon ${SMILODON_PATH}
|
||||||
|
|
||||||
if [ ! $SMILODON_SECRET_KEY ]; then
|
|
||||||
SMILODON_SECRET_KEY="$(create_password 30)$(create_password 30)$(create_password 30)$(create_password 30)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo '#!/bin/bash' > ${SMILODON_PATH}/run_smilodon.sh
|
echo '#!/bin/bash' > ${SMILODON_PATH}/run_smilodon.sh
|
||||||
echo "cd ${SMILODON_PATH}" >> ${SMILODON_PATH}/run_smilodon.sh
|
echo "cd ${SMILODON_PATH}" >> ${SMILODON_PATH}/run_smilodon.sh
|
||||||
echo "export smilodon_domain_name=$SMILODON_ONION_HOSTNAME" >> ${SMILODON_PATH}/run_smilodon.sh
|
echo "export smilodon_domain_name=$SMILODON_ONION_HOSTNAME" >> ${SMILODON_PATH}/run_smilodon.sh
|
||||||
|
@ -358,6 +365,7 @@ function install_smilodon {
|
||||||
systemctl enable smilodon
|
systemctl enable smilodon
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl start smilodon
|
systemctl start smilodon
|
||||||
|
systemctl restart nginx
|
||||||
|
|
||||||
${PROJECT_NAME}-pass -u $MY_USERNAME -a smilodon -p "$SMILODON_ADMIN_PASSWORD"
|
${PROJECT_NAME}-pass -u $MY_USERNAME -a smilodon -p "$SMILODON_ADMIN_PASSWORD"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue