mirror of
https://github.com/YunoHost-Apps/flohmarkt_ynh.git
synced 2024-09-03 18:36:30 +02:00
commit
6364e57085
11 changed files with 26 additions and 26 deletions
|
@ -64,7 +64,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so
|
|||
## :red_circle: Antifeatures
|
||||
|
||||
- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability.
|
||||
- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README.
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so
|
|||
## :red_circle: Ezaugarri zalantzagarriak
|
||||
|
||||
- **Alfa softwarea**: Garapenaren hasierako fasean dago. Ezaugarri aldakor edo ezegonkorrak, erroreak eta segurtasun-arazoak izan ditzazke.
|
||||
- **Muga arbitrarioak**: Muga arbitrarioak ditu. Irakurri README fitxategia.
|
||||
|
||||
## Dokumentazioa eta baliabideak
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so
|
|||
## :red_circle: Anti-fonctionnalités
|
||||
|
||||
- **Logiciel en version alpha **: Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité.
|
||||
- **Limitations arbitraires **: Contient des limitations arbitraires. Se référer au fichier README.
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so
|
|||
## :red_circle: Debes considerar
|
||||
|
||||
- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability.
|
||||
- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README.
|
||||
|
||||
## Documentación e recursos
|
||||
|
||||
|
|
|
@ -64,7 +64,6 @@ Generally the [wiki](https://codeberg.org/flohmarkt/flohmarkt/wiki) is a good so
|
|||
## :red_circle: 负面特征
|
||||
|
||||
- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability.
|
||||
- **Arbitrary limitations**: Features arbitrary limitations. Please refer to the README.
|
||||
|
||||
## 文档与资源
|
||||
|
||||
|
|
|
@ -7,14 +7,6 @@ flohmarkt expects to install CouchDB from the Apache repository for its use. Ins
|
|||
https://codeberg.org/flohmarkt/flohmarkt_ynh/src/commit/7721103bac61787f31a4b2f2ae695c65d4f26fc9/scripts/install#L9
|
||||
https://codeberg.org/ChriChri/flohmarkt_ynh/issues/9
|
||||
|
||||
## choosing a sender email address
|
||||
|
||||
flohmarkt will send email and you'll be asked for an address used as the sender in these emails. yunohost will try to configure your chosen address as an allowed sender, but for the time being **this will only work if the sender address is not in use otherwise** - e.g. as an alias.
|
||||
|
||||
This [issue](https://codeberg.org/flohmarkt/flohmarkt_ynh/issues/50) contains information about the problem.
|
||||
|
||||
There's a [pull request to yunohost](https://github.com/YunoHost/yunohost/pull/1843) open that should solve the problem.
|
||||
|
||||
## multiple flohmarkt on the same subdomain will not work
|
||||
|
||||
flohmarkt **needs its own subdomain** to be installed on. Some of the discussion about this can be found here:
|
||||
|
|
|
@ -25,6 +25,8 @@ flohmarkt_install="$install_dir"
|
|||
flohmarkt_sym_install="$( dirname $flohmarkt_install )/$flohmarkt_filename"
|
||||
flohmarkt_venv_dir="${flohmarkt_install}/venv"
|
||||
flohmarkt_app_dir="${flohmarkt_install}/app"
|
||||
flohmarkt_cron_job="/etc/cron.hourly/${app}"
|
||||
flohmarkt_urlwatch_dir="${flohmarkt_install}/urlwatch"
|
||||
# directory containing logfiles
|
||||
flohmarkt_log_dir="/var/log/${app}"
|
||||
flohmarkt_sym_log_dir="/var/log/${flohmarkt_filename}"
|
||||
|
@ -748,6 +750,15 @@ flohmarkt_ynh_create_venv() {
|
|||
python3 -m venv --without-pip "$flohmarkt_venv_dir"
|
||||
}
|
||||
|
||||
flohmarkt_ynh_venv_upgrade() {
|
||||
ynh_print_warn --message="flohmarkt_ynh_venv_upgrade: I'll sit here and do nothing without @grindholds confirmation"
|
||||
return
|
||||
(
|
||||
$flohmarkt_venv_dir/bin/python3 -m venv --upgrade-deps
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
# install requirements.txt in venv
|
||||
flohmarkt_ynh_venv_requirements() {
|
||||
(
|
||||
|
@ -761,24 +772,24 @@ flohmarkt_ynh_venv_requirements() {
|
|||
}
|
||||
|
||||
flohmarkt_ynh_urlwatch_cron() {
|
||||
mkdir -m 750 -p "${flohmarkt_install}/urlwatch"
|
||||
chown ${app}:root "${flohmarkt_install}/urlwatch"
|
||||
mkdir -m 750 -p "${flohmarkt_urlwatch_dir}"
|
||||
chown ${app}:root "${flohmarkt_urlwatch_dir}"
|
||||
ynh_add_config --template="../conf/urlwatch_config.yaml" \
|
||||
--destination="${flohmarkt_install}/urlwatch/config.yaml"
|
||||
--destination="${flohmarkt_urlwatch_dir}/config.yaml"
|
||||
ynh_add_config --template="../conf/urlwatch_urls.yaml" \
|
||||
--destination="${flohmarkt_install}/urlwatch/urls.yaml"
|
||||
--destination="${flohmarkt_urlwatch_dir}/urls.yaml"
|
||||
ynh_add_config --template="../conf/urlwatch.cron" \
|
||||
--destination="/etc/cron.hourly/${flohmarkt_filename}"
|
||||
chown root:root "/etc/cron.hourly/${flohmarkt_filename}"
|
||||
chmod 755 "/etc/cron.hourly/${flohmarkt_filename}"
|
||||
--destination="${flohmarkt_cron_job}"
|
||||
chown root:root "${flohmarkt_cron_job}"
|
||||
chmod 755 "${flohmarkt_cron_job}"
|
||||
# run urlwatch once to initialize if cache file does not exist,
|
||||
# but if sending email fails (like on CI) just warn. We do not want
|
||||
# to show the output that might contain passwords
|
||||
if ! [[ -s /var/www/${app}/urlwatch/cache.file ]] &&
|
||||
if ! [[ -s ${flohmarkt_urlwatch_dir}/cache.file ]] &&
|
||||
! ynh_exec_fully_quiet sudo -u ${app} urlwatch \
|
||||
--config=/var/www/${app}/urlwatch/config.yaml \
|
||||
--urls=/var/www/${app}/urlwatch/urls.yaml \
|
||||
--cache=/var/www/${app}/urlwatch/cache.file
|
||||
--config=${flohmarkt_urlwatch_dir}/config.yaml \
|
||||
--urls=${flohmarkt_urlwatch_dir}/urls.yaml \
|
||||
--cache=${flohmarkt_urlwatch_dir}/cache.file
|
||||
then
|
||||
ynh_print_warn --message="initial call to urlwatch failed"
|
||||
fi
|
||||
|
|
|
@ -11,7 +11,7 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
|||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||
ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini"
|
||||
ynh_backup --src_path="/etc/systemd/system/$flohmarkt_filename.service"
|
||||
ynh_backup --src_path="/etc/cron.hourly/$flohmarkt_filename"
|
||||
ynh_backup --src_path="${flohmarkt_cron_job}"
|
||||
ynh_backup --src_path="${flohmarkt_log_dir}"
|
||||
|
||||
# for the following backups we'll want to stop flohmarkt and couchdb
|
||||
|
|
|
@ -59,6 +59,7 @@ ynh_setup_source --dest_dir="$flohmarkt_app_dir"
|
|||
ynh_script_progression --message="Creating python venv..." --weight=2
|
||||
ynh_secure_remove "$flohmarkt_venv_dir"
|
||||
flohmarkt_ynh_create_venv
|
||||
flohmarkt_ynh_venv_upgrade
|
||||
flohmarkt_ynh_venv_requirements
|
||||
|
||||
# JwtSecret
|
||||
|
|
|
@ -86,6 +86,6 @@ flohmarkt_ynh_create_symlinks
|
|||
|
||||
# restore cronjob file for urlwatch
|
||||
ynh_script_progression --message="Restoring cronjob for urlwatch..." --weight=1
|
||||
ynh_restore_file --origin_path="/etc/cron.hourly/$flohmarkt_filename"
|
||||
ynh_restore_file --origin_path="${flohmarkt_cron_job}"
|
||||
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
|
|
|
@ -48,6 +48,7 @@ ynh_setup_source --dest_dir="$flohmarkt_app_dir/"
|
|||
|
||||
ynh_script_progression --message="Upgrading flohmarkt python dependencies..." --weight=6
|
||||
# upgrade python environment / install new dependencies
|
||||
flohmarkt_ynh_venv_upgrade
|
||||
flohmarkt_ynh_venv_requirements
|
||||
|
||||
# upgrade flohmarkt.conf
|
||||
|
|
Loading…
Reference in a new issue