1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

Remove apps-enabled folder and useless removal

This commit is contained in:
Jean-Baptiste Holcroft 2017-09-21 09:59:10 +02:00
parent c539006eed
commit 34738652a6
5 changed files with 5 additions and 18 deletions

View file

@ -8,7 +8,6 @@
domain="domain.tld" (DOMAIN) domain="domain.tld" (DOMAIN)
path="/path" (PATH) path="/path" (PATH)
admin="john" (USER) admin="john" (USER)
language="fr"
is_public=1 (PUBLIC|public=1|private=0) is_public=1 (PUBLIC|public=1|private=0)
password="pass" password="pass"
; Checks ; Checks
@ -18,7 +17,7 @@
setup_nourl=0 setup_nourl=0
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=0 upgrade=1
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
incorrect_path=1 incorrect_path=1

View file

@ -1,9 +1,9 @@
# https://docs.weblate.org/en/latest/admin/install.html#production-cron # https://docs.weblate.org/en/latest/admin/install.html#production-cron
# Fulltext index updates # Fulltext index updates
10 * * * * root cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate update_index 10 * * * * root source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate update_index
# Cleanup stale objects # Cleanup stale objects
@daily root cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate cleanuptrans @daily root source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate cleanuptrans
# Commit pending changes after 96 hours # Commit pending changes after 96 hours
@hourly root cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate commit_pending --all --age=96 --verbosity=0 @hourly root source __FINALPATH__/venv/bin/activate && DJANGO_SETTINGS_MODULE="weblate.settings" weblate commit_pending --all --age=96 --verbosity=0

View file

@ -9,7 +9,7 @@ Group=__NAME__
RemainAfterExit=yes RemainAfterExit=yes
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
ExecStart=/usr/bin/uwsgi \ ExecStart=/usr/bin/uwsgi \
--ini /etc/uwsgi/apps-enabled/__NAME__.ini \ --ini __FINALPATH_/uwsgi.ini \
--socket __FINALPATH__/socket --socket __FINALPATH__/socket
Restart=always Restart=always
StandardError=syslog StandardError=syslog

View file

@ -115,10 +115,6 @@ cp ../conf/uwsgi.ini "$final_path/uwsgi.ini"
ynh_replace_string "__NAME__" "$app" "$final_path/uwsgi.ini" ynh_replace_string "__NAME__" "$app" "$final_path/uwsgi.ini"
ynh_replace_string "__FINALPATH__" "$final_path" "$final_path/uwsgi.ini" ynh_replace_string "__FINALPATH__" "$final_path" "$final_path/uwsgi.ini"
# Config service
mkdir -p /etc/uwsgi/apps-enabled/
ln -s "$final_path/uwsgi.ini" "/etc/uwsgi/apps-enabled/$app.ini"
cp ../conf/uwsgi_service "/etc/systemd/system/$app.service" cp ../conf/uwsgi_service "/etc/systemd/system/$app.service"
ynh_replace_string "__NAME__" "$app" "/etc/systemd/system/$app.service" ynh_replace_string "__NAME__" "$app" "/etc/systemd/system/$app.service"
ynh_replace_string "__FINALPATH__" "$final_path" "/etc/systemd/system/$app.service" ynh_replace_string "__FINALPATH__" "$final_path" "/etc/systemd/system/$app.service"

View file

@ -73,18 +73,10 @@ ynh_remove_logrotate
# Remove a cron file # Remove a cron file
ynh_secure_remove "/etc/cron.d/$app" ynh_secure_remove "/etc/cron.d/$app"
# Remove a directory securely
ynh_secure_remove "/etc/$app/"
# Remove the log files
ynh_secure_remove "/var/log/$app/"
#================================================= #=================================================
# REMOVE uwsgi and systemd files # REMOVE uwsgi and systemd files
#================================================= #=================================================
ynh_secure_remove "/etc/uwsgi/apps-enabled/$app.ini"
ynh_secure_remove "/etc/systemd/system/$app.service" ynh_secure_remove "/etc/systemd/system/$app.service"
#================================================= #=================================================