2023-12-11 17:56:26 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
|
|
|
# COMMON VARIABLES
|
|
|
|
#=================================================
|
|
|
|
|
2023-12-12 11:38:41 +01:00
|
|
|
APPLITYPE="lucterios.standard"
|
|
|
|
MODULES="lucterios.contacts,lucterios.documents,lucterios.mailing"
|
|
|
|
DATABASE="postgresql:name=$db_name,user=$db_user,password=$db_pwd,host=localhost"
|
|
|
|
if [ "$lct_appli" == "asso" ]
|
|
|
|
then
|
2023-12-15 15:13:07 +01:00
|
|
|
MODULES+="diacamma.accounting,diacamma.payoff,diacamma.invoice,diacamma.member,diacamma.event"
|
2023-12-12 11:38:41 +01:00
|
|
|
APPLITYPE="diacamma.asso"
|
|
|
|
fi
|
|
|
|
if [ "$lct_appli" == "syndic" ]
|
|
|
|
then
|
2023-12-15 15:13:07 +01:00
|
|
|
MODULES+="diacamma.accounting,diacamma.payoff,diacamma.condominium"
|
2023-12-12 11:38:41 +01:00
|
|
|
APPLITYPE="diacamma.syndic"
|
|
|
|
fi
|
|
|
|
|
2023-12-11 17:56:26 +01:00
|
|
|
#=================================================
|
|
|
|
# PERSONAL HELPERS
|
|
|
|
#=================================================
|
2023-12-12 11:38:41 +01:00
|
|
|
|
|
|
|
function refresh_collect()
|
|
|
|
{
|
2023-12-12 13:07:45 +01:00
|
|
|
pushd $install_dir
|
2023-12-12 14:06:16 +01:00
|
|
|
venv/bin/python3 manage_inst-${app}.py collectstatic --noinput -l
|
2023-12-12 16:18:11 +01:00
|
|
|
rm -rf inst-${app}/static/static
|
|
|
|
rm -rf inst-${app}/static/tmp
|
|
|
|
rm -rf inst-${app}/static/usr
|
|
|
|
rm -rf inst-${app}/static/__pycache__
|
|
|
|
rm -rf inst-${app}/static/settings.py
|
|
|
|
rm -rf inst-${app}/static/__init__.py
|
|
|
|
chown -R ${app}:www-data .
|
|
|
|
chmod 750 .
|
2023-12-12 13:07:45 +01:00
|
|
|
popd
|
2023-12-12 11:38:41 +01:00
|
|
|
}
|
2023-12-12 16:28:42 +01:00
|
|
|
|
|
|
|
function check_params()
|
|
|
|
{
|
|
|
|
pushd $install_dir
|
|
|
|
echo "
|
|
|
|
from lucterios.CORE.parameters import Params
|
|
|
|
Params.setvalue('mailing-smtpserver', 'localhost')
|
|
|
|
Params.setvalue('mailing-smtpport', 1025)
|
|
|
|
" > /tmp/diacamma_script.py
|
|
|
|
venv/bin/python3 manage_inst-${app}.py shell < /tmp/diacamma_script.py
|
|
|
|
venv/bin/lucterios_admin.py security -n inst-${app} -e "MODE=0"
|
|
|
|
popd
|
2023-12-15 15:13:07 +01:00
|
|
|
}
|