59 lines
1.7 KiB
Text
59 lines
1.7 KiB
Text
|
#!/bin/bash
|
||
|
### App file generated with YoloGen, the Yunohost app generator, version .
|
||
|
|
||
|
source _common.sh
|
||
|
source /usr/share/yunohost/helpers
|
||
|
|
||
|
#=================================================
|
||
|
# INSTALL DEPENDENCIES
|
||
|
#=================================================
|
||
|
|
||
|
#=================================================
|
||
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||
|
#=================================================
|
||
|
ynh_script_progression "Setting up source files..."
|
||
|
|
||
|
ynh_setup_source --dest_dir="$install_dir"
|
||
|
|
||
|
chown -R $app:www-data "$install_dir"
|
||
|
|
||
|
#=================================================
|
||
|
# ADD A CONFIGURATION
|
||
|
#=================================================
|
||
|
ynh_script_progression "Adding app's configuration file..."
|
||
|
|
||
|
ynh_config_add --template="" --destination="$install_dir/"
|
||
|
|
||
|
chmod 400 "$install_dir/"
|
||
|
chown "$app:$app" "$install_dir/"
|
||
|
|
||
|
#=================================================
|
||
|
# SYSTEM CONFIGURATION
|
||
|
#=================================================
|
||
|
ynh_script_progression "Adding system configurations related to $app..."
|
||
|
|
||
|
ynh_config_add_nginx
|
||
|
|
||
|
ynh_config_add_logrotate
|
||
|
|
||
|
#=================================================
|
||
|
# INSTALL APP
|
||
|
#=================================================
|
||
|
ynh_script_progression "Installing $app..."
|
||
|
|
||
|
pushd $install_dir
|
||
|
some_command --build
|
||
|
popd
|
||
|
|
||
|
#=================================================
|
||
|
# FINALIZE APP INSTALL WITH CURL
|
||
|
#=================================================
|
||
|
ynh_script_progression "Finalizing installation..."
|
||
|
|
||
|
ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3"
|
||
|
|
||
|
#=================================================
|
||
|
# END OF SCRIPT
|
||
|
#=================================================
|
||
|
|
||
|
ynh_script_progression "Installation of $app completed"
|