mirror of
https://github.com/YunoHost-Apps/chatonsinfos_ynh.git
synced 2024-09-03 18:15:58 +02:00
49 lines
1.8 KiB
Bash
Executable file
49 lines
1.8 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#=================================================
|
|
# GENERIC START
|
|
#=================================================
|
|
# IMPORT GENERIC HELPERS
|
|
#=================================================
|
|
|
|
source _common.sh
|
|
source /usr/share/yunohost/helpers
|
|
|
|
#=================================================
|
|
# APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC)
|
|
#=================================================
|
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
#=================================================
|
|
ynh_script_progression --message="Setting up source files..." --weight=1
|
|
|
|
### `ynh_setup_source` is used to install an app from a zip or tar.gz file,
|
|
### downloaded from an upstream source, like a git repository.
|
|
### `ynh_setup_source` use the file conf/app.src
|
|
|
|
# Download, check integrity, uncompress and patch the source from app.src
|
|
ynh_setup_source --dest_dir="$install_dir/sources"
|
|
mkdir $install_dir/public
|
|
# $install_dir will automatically be initialized with some decent
|
|
# permission by default ... however, you may need to recursively reapply
|
|
# ownership to all files such as after the ynh_setup_source step
|
|
chown -R $app:www-data "$install_dir/public"
|
|
|
|
#=================================================
|
|
# APP INITIAL CONFIGURATION
|
|
#=================================================
|
|
# ADD A CONFIGURATION
|
|
#=================================================
|
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|
|
|
cp "$install_dir/sources/organization.properties" "$install_dir/public/"
|
|
|
|
chown -R $app:www-data"$install_dir/public"
|
|
|
|
#=================================================
|
|
# GENERIC FINALIZATION
|
|
#=================================================
|
|
|
|
#=================================================
|
|
# END OF SCRIPT
|
|
#=================================================
|
|
ynh_script_progression --message="Installation of $app completed" --last
|