Commit 59986963 authored by Marcus's avatar Marcus

fix pip3 install command and beautify output

parent c242e23a
......@@ -50,8 +50,9 @@ echo "Adding user ${USER}"
useradd -m ${USER} > /dev/null 2>&1
RV=$?
case "$RV" in
0-8) echo "Error creating user"; exit 1;;
10-14) echo "Error creating user"; exit 1;;
0-8) echo " Error creating user"; exit 1;;
9) echo " user already existed";;
10-14) echo " Error creating user"; exit 1;;
esac
### Install feudalClient
......@@ -86,8 +87,11 @@ git co ${ADAPTER_BRANCH} > /dev/null 2>&1
git pull > /dev/null 2>&1
./setup.py sdist > /dev/null
FULLNAME=`python3 setup.py --fullname`
${PIP} install dist/$FULLNAME.tar.gz > /dev/null
echo -e "feudalAdapterLDF installed"
${PIP} install -U dist/$FULLNAME.tar.gz > /dev/null 2>&1 || {
echo -e"\n\n ${PIP} ${PIP_PARAMS} install dist/$FULLNAME.tar.gz => FAILED"
exit 1
}
echo -e " Done"
# => ldf_adapter is now in $PATH
......@@ -102,17 +106,19 @@ test -d ${ETC_CONFIG} || {
### Install Config Files
test -e ${ETC_CONFIG}/ldf_adapter.conf || {
echo "Installing a template for ldf_adapter.conf in ${ETC_CONFIG}"
echo " => You need to edit this file"
cp feudalAdapterLdf/ldf_adapter_template.conf ${ETC_CONFIG}
test -e ${ETC_CONFIG}/ldf_adapter_template.conf || {
echo "Installing a template for ldf_adapter.conf in ${ETC_CONFIG}"
cp feudalAdapterLdf/ldf_adapter_template.conf ${ETC_CONFIG}
}
}
popd > /dev/null
test -e ${ETC_CONFIG}/client_config.json || {
echo "Installing a template for client_config_template.json in ${ETC_CONFIG}"
echo " => You need to edit this file"
cp client_config_template.json ${ETC_CONFIG}
test -e ${ETC_CONFIG}/client_config_template.json || {
echo "Installing a template for client_config_template.json in ${ETC_CONFIG}"
cp client_config_template.json ${ETC_CONFIG}
}
}
test -e ${ETC_CONFIG}/environment || {
echo "Installing a template for environment in ${ETC_CONFIG}"
......@@ -135,10 +141,10 @@ test -e ${LIB_SYSD}/${SERVICE}.service || {
cp ${SYSD_SERVICE} ${LIB_SYSD}/${SERVICE}.service
systemctl daemon-reload
}
echo -e "Done\nRestarting ${SYSD_SERVICE}"
systemctl enable $SERVICE
echo -e " Done\nRestarting ${SYSD_SERVICE}"
systemctl enable $SERVICE > /dev/null 2>&1
systemctl restart $SERVICE
echo "Done"
echo " Done"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment