mirror of
https://github.com/YunoHost-Apps/flohmarkt_ynh.git
synced 2024-09-03 18:36:30 +02:00
parent
5e4c3fdd39
commit
f1bfdd1283
4 changed files with 10 additions and 2 deletions
|
@ -24,11 +24,12 @@ flohmarkt_sym_install="$( dirname $flohmarkt_install )/$flohmarkt_filename"
|
||||||
flohmarkt_venv_dir="${flohmarkt_install}/venv"
|
flohmarkt_venv_dir="${flohmarkt_install}/venv"
|
||||||
flohmarkt_app_dir="${flohmarkt_install}/app"
|
flohmarkt_app_dir="${flohmarkt_install}/app"
|
||||||
# directory containing logfiles
|
# directory containing logfiles
|
||||||
flohmarkt_log_dir="/var/log/${YNH_APP_ID}/${flohmarkt_filename}"
|
flohmarkt_log_dir="/var/log/${app}"
|
||||||
|
flohmarkt_sym_log_dir="/var/log/${flohmarkt_filename}"
|
||||||
# filename for logfiles - ¡ojo! if not ends with .log will be interpreted
|
# filename for logfiles - ¡ojo! if not ends with .log will be interpreted
|
||||||
# as a directory by ynh_use_logrotate
|
# as a directory by ynh_use_logrotate
|
||||||
# https://github.com/YunoHost/issues/issues/2383
|
# https://github.com/YunoHost/issues/issues/2383
|
||||||
flohmarkt_logfile="${flohmarkt_log_dir}/${app}.log"
|
flohmarkt_logfile="${flohmarkt_log_dir}/app.log"
|
||||||
# flohmarkt data_dir
|
# flohmarkt data_dir
|
||||||
flohmarkt_data_dir="$data_dir"
|
flohmarkt_data_dir="$data_dir"
|
||||||
flohmarkt_sym_data_dir="$( dirname $flohmarkt_data_dir )/$flohmarkt_filename"
|
flohmarkt_sym_data_dir="$( dirname $flohmarkt_data_dir )/$flohmarkt_filename"
|
||||||
|
|
|
@ -12,6 +12,10 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
ynh_backup --src_path="/opt/couchdb/etc/local.d/05-flohmarkt.ini"
|
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/systemd/system/$flohmarkt_filename.service"
|
||||||
ynh_backup --src_path="${flohmarkt_log_dir}"
|
ynh_backup --src_path="${flohmarkt_log_dir}"
|
||||||
|
ynh_backup --src_path="$flohmarkt_sym_install"
|
||||||
|
ynh_backup --src_path="$flohmarkt_sym_data_dir"
|
||||||
|
ynh_backup --src_path="$flohmarkt_sym_log_dir"
|
||||||
|
|
||||||
|
|
||||||
# for the following backups we'll want to stop flohmarkt and couchdb
|
# for the following backups we'll want to stop flohmarkt and couchdb
|
||||||
# to guarentee a consistant state
|
# to guarentee a consistant state
|
||||||
|
|
|
@ -119,6 +119,7 @@ ynh_add_fail2ban_config --logpath="$flohmarkt_logfile" --failregex='INFO: +<HOST
|
||||||
ynh_script_progression --message="Creating symlinks..." --weight=1
|
ynh_script_progression --message="Creating symlinks..." --weight=1
|
||||||
ln -s "$flohmarkt_install" "$flohmarkt_sym_install"
|
ln -s "$flohmarkt_install" "$flohmarkt_sym_install"
|
||||||
ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir"
|
ln -s "$flohmarkt_data_dir" "$flohmarkt_sym_data_dir"
|
||||||
|
ln -s "$flohmarkt_log_dir" "$flohmarkt_sym_log_dir"
|
||||||
|
|
||||||
# start service
|
# start service
|
||||||
ynh_script_progression --message="Debug before starting flohmarkt..." --weight=1
|
ynh_script_progression --message="Debug before starting flohmarkt..." --weight=1
|
||||||
|
|
|
@ -63,8 +63,10 @@ ynh_script_progression --message="Removing data directory..." --weight=2
|
||||||
ynh_remove_systemd_config
|
ynh_remove_systemd_config
|
||||||
|
|
||||||
# remove symlinks
|
# remove symlinks
|
||||||
|
ynh_script_progression --message="Removing symlinks..." --weight=2
|
||||||
ynh_secure_remove --file="$flohmarkt_sym_install"
|
ynh_secure_remove --file="$flohmarkt_sym_install"
|
||||||
ynh_secure_remove --file="$flohmarkt_sym_data_dir"
|
ynh_secure_remove --file="$flohmarkt_sym_data_dir"
|
||||||
|
ynh_secure_remove --file="$flohmarkt_sym_log_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
Loading…
Add table
Reference in a new issue