1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diacamma_ynh.git synced 2024-09-03 18:26:10 +02:00

corrections

This commit is contained in:
Laurent GAY 2023-12-15 16:58:51 +01:00
parent ea239d2611
commit fb7cda225d
8 changed files with 20 additions and 17 deletions

4
conf/diacamma_script.py Normal file
View file

@ -0,0 +1,4 @@
from lucterios.CORE.parameters import Params
Params.setvalue('mailing-smtpserver', 'localhost')
Params.setvalue('mailing-smtpport', 1025)

View file

@ -1,7 +1,7 @@
{ {
"LANGUAGE_CODE":"__LANGUAGE__", "LANGUAGE_CODE":"__LANGUAGE__",
"USE_X_FORWARDED_HOST":true, "USE_X_FORWARDED_HOST":true,
"FORCE_SCRIPT_NAME":"/__APP__", "FORCE_SCRIPT_NAME":"__PATH__",
"LDAP_SERVERS": [{"host": "127.0.0.1", "port": 389, "use_ssl": false, "get_info": "NONE"}], "LDAP_SERVERS": [{"host": "127.0.0.1", "port": 389, "use_ssl": false, "get_info": "NONE"}],
"LDAP_ENGINE" : "OpenLDAP", "LDAP_ENGINE" : "OpenLDAP",
"LDAP_AUTHENTICATION" : "ANONYMOUS", "LDAP_AUTHENTICATION" : "ANONYMOUS",

3
conf/extra_url Normal file
View file

@ -0,0 +1,3 @@
# Pypi server
https://pypi.diacamma.org

View file

@ -11,7 +11,7 @@ version = "23.12.15.16~ynh1"
maintainers = ["Laurent Gay"] maintainers = ["Laurent Gay"]
[upstream] [upstream]
license = "GNU General Public License v3.0" license = " GPL-3.0-or-later"
website = "https://www.diacamma.org" website = "https://www.diacamma.org"
demo = "https://asso.diacamma.org" demo = "https://asso.diacamma.org"
code = "https://github.com/Diacamma2" code = "https://github.com/Diacamma2"

View file

@ -26,12 +26,12 @@ function refresh_collect()
{ {
pushd $install_dir pushd $install_dir
venv/bin/python3 manage_inst-${app}.py collectstatic --noinput -l venv/bin/python3 manage_inst-${app}.py collectstatic --noinput -l
rm -rf inst-${app}/static/static ynh_secure_remove inst-${app}/static/static
rm -rf inst-${app}/static/tmp ynh_secure_remove inst-${app}/static/tmp
rm -rf inst-${app}/static/usr ynh_secure_remove inst-${app}/static/usr
rm -rf inst-${app}/static/__pycache__ ynh_secure_remove inst-${app}/static/__pycache__
rm -rf inst-${app}/static/settings.py ynh_secure_remove inst-${app}/static/settings.py
rm -rf inst-${app}/static/__init__.py ynh_secure_remove inst-${app}/static/__init__.py
chown -R ${app}:www-data . chown -R ${app}:www-data .
chmod 750 . chmod 750 .
popd popd
@ -40,11 +40,7 @@ function refresh_collect()
function check_params() function check_params()
{ {
pushd $install_dir pushd $install_dir
echo " ynh_add_config --template="../conf/diacamma_script.py" --destination="/tmp/diacamma_script.py"
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/python3 manage_inst-${app}.py shell < /tmp/diacamma_script.py
venv/bin/lucterios_admin.py security -n inst-${app} -e "MODE=0" venv/bin/lucterios_admin.py security -n inst-${app} -e "MODE=0"
popd popd

View file

@ -10,9 +10,9 @@ ynh_script_progression --message="Installing app..." --weight=5
pushd $install_dir pushd $install_dir
python3 -m venv venv python3 -m venv venv
if [ "$develop" == "true" ] if [ $develop -eq 1 ]
then then
echo "https://pypi.diacamma.org" > extra_url ynh_add_config --template="../conf/extra_url" --destination="./extra_url"
pip_option='--extra-index-url "https://pypi.diacamma.org"' pip_option='--extra-index-url "https://pypi.diacamma.org"'
else else
pip_option='' pip_option=''

View file

@ -45,7 +45,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
yunohost service add $app --log="/var/log/$app/$app.log" yunohost service add ${app} --log="/var/log/${app}/${app}.log"
ynh_restore_file --origin_path="/etc/logrotate.d/$app" ynh_restore_file --origin_path="/etc/logrotate.d/$app"

View file

@ -34,7 +34,7 @@ ynh_add_nginx_config
ynh_add_systemd_config ynh_add_systemd_config
yunohost service add $app --log="/var/log/$app/$app.log" yunohost service add ${app} --log="/var/log/${app}/${app}.log"
ynh_use_logrotate --non-append ynh_use_logrotate --non-append