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:
parent
ea239d2611
commit
fb7cda225d
8 changed files with 20 additions and 17 deletions
4
conf/diacamma_script.py
Normal file
4
conf/diacamma_script.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from lucterios.CORE.parameters import Params
|
||||
|
||||
Params.setvalue('mailing-smtpserver', 'localhost')
|
||||
Params.setvalue('mailing-smtpport', 1025)
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"LANGUAGE_CODE":"__LANGUAGE__",
|
||||
"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_ENGINE" : "OpenLDAP",
|
||||
"LDAP_AUTHENTICATION" : "ANONYMOUS",
|
||||
|
|
3
conf/extra_url
Normal file
3
conf/extra_url
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Pypi server
|
||||
|
||||
https://pypi.diacamma.org
|
|
@ -11,7 +11,7 @@ version = "23.12.15.16~ynh1"
|
|||
maintainers = ["Laurent Gay"]
|
||||
|
||||
[upstream]
|
||||
license = "GNU General Public License v3.0"
|
||||
license = " GPL-3.0-or-later"
|
||||
website = "https://www.diacamma.org"
|
||||
demo = "https://asso.diacamma.org"
|
||||
code = "https://github.com/Diacamma2"
|
||||
|
|
|
@ -26,12 +26,12 @@ function refresh_collect()
|
|||
{
|
||||
pushd $install_dir
|
||||
venv/bin/python3 manage_inst-${app}.py collectstatic --noinput -l
|
||||
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
|
||||
ynh_secure_remove inst-${app}/static/static
|
||||
ynh_secure_remove inst-${app}/static/tmp
|
||||
ynh_secure_remove inst-${app}/static/usr
|
||||
ynh_secure_remove inst-${app}/static/__pycache__
|
||||
ynh_secure_remove inst-${app}/static/settings.py
|
||||
ynh_secure_remove inst-${app}/static/__init__.py
|
||||
chown -R ${app}:www-data .
|
||||
chmod 750 .
|
||||
popd
|
||||
|
@ -40,11 +40,7 @@ function refresh_collect()
|
|||
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
|
||||
ynh_add_config --template="../conf/diacamma_script.py" --destination="/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
|
||||
|
|
|
@ -10,9 +10,9 @@ ynh_script_progression --message="Installing app..." --weight=5
|
|||
|
||||
pushd $install_dir
|
||||
python3 -m venv venv
|
||||
if [ "$develop" == "true" ]
|
||||
if [ $develop -eq 1 ]
|
||||
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"'
|
||||
else
|
||||
pip_option=''
|
||||
|
|
|
@ -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"
|
||||
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"
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ ynh_add_nginx_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
|
||||
|
||||
|
|
Loading…
Reference in a new issue