| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #!/bin/bash
- #=================================================
- # COMMON VARIABLES
- #=================================================
- ## new filenames starting 0.00~ynh5
- # make a filename/service name from domain/path
- if [[ "$path" == /* ]]; then
- url_path="${path:1}"
- fi
- if [[ "__${url_path}__" == '____' ]]; then
- flohmarkt_filename="$domain"
- else
- flohmarkt_filename="$domain-${url_path}"
- fi
- # this filename is used for logfile name and systemd.service name
- # and for symlinking install_dir and data_dir
- flohmarkt_filename="${YNH_APP_ID}_${flohmarkt_filename//[^A-Za-z0-9._-]/_}"
- # directory flohmarkts software is installed to
- # contains ./venv and ./src as sub-directories
- flohmarkt_install="$install_dir"
- flohmarkt_sym_install="$( dirname $flohmarkt_install )/$flohmarkt_filename"
- flohmarkt_venv_dir="${flohmarkt_install}/venv"
- flohmarkt_app_dir="${flohmarkt_install}/app"
- # directory containing logfiles
- flohmarkt_log_dir="/var/log/${YNH_APP_ID}/${flohmarkt_filename}"
- # filename for logfiles - ¡ojo! if not ends with .log will be interpreted
- # as a directory by ynh_use_logrotate
- # https://github.com/YunoHost/issues/issues/2383
- flohmarkt_logfile="${flohmarkt_log_dir}/${app}.log"
- # flohmarkt data_dir
- flohmarkt_data_dir="$data_dir"
- flohmarkt_sym_data_dir="$( dirname $flohmarkt_data_dir )/$flohmarkt_filename"
- ## old filenames before 0.00~ynh5 - for reference and needed to
- # migrate (see below)
- flohmarkt_old_install="$install_dir/$app/"
- flohmarkt_old_venv_dir="$install_dir/venv"
- flohmarkt_old_log_dir="/var/log/$app/"
- flohmarkt_old_logfile="$app"
- flohmarkt_old_service="$app"
- #=================================================
- # PERSONAL HELPERS
- #=================================================
- # move files and directories to their new places
- flohmarkt_ynh_upgrade_path_ynh5() {
- # flohmarkt and couchdb are already stopped in upgrade script
- # move install_dir
- # move venv_dir
- # move data_dir
- # move systemd.service
- # move logfiles
- # update settings for above
-
- false
- # there's still some work open - see above
- }
- #=================================================
- # EXPERIMENTAL HELPERS
- #=================================================
- #=================================================
- # FUTURE OFFICIAL HELPERS
- #=================================================
|