more files
move to folders
This commit is contained in:
parent
29553907ec
commit
56b0525590
10 changed files with 239 additions and 0 deletions
1
DESCRIPTION.md
Normal file
1
DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
|||
This is a dummy description of this app features
|
7
POST_INSTALL.md
Normal file
7
POST_INSTALL.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
This is a dummy disclaimer to display after the install
|
||||
|
||||
The app url is <https://__DOMAIN____PATH__>
|
||||
|
||||
The app install dir is `__INSTALL_DIR__`
|
||||
|
||||
The app id is `__ID__`
|
5
_common.sh
Normal file
5
_common.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# COMMON VARIABLES AND CUSTOM HELPERS
|
||||
#=================================================
|
33
backup
Normal file
33
backup
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
#### App file generated with YoloGen, the YunoHost app generator, version .
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
ynh_print_info "Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# SYSTEM CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_backup "/etc/logrotate.d/$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/var/log/$app/" # TODO: add an option to specify log file
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
26
change_url
Normal file
26
change_url
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
### App file generated with YoloGen, the YunoHost app generator, version .
|
||||
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression "Updating NGINX web server configuration..."
|
||||
|
||||
ynh_config_change_url_nginx
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression "Change of URL completed for $app"
|
59
install
Normal file
59
install
Normal file
|
@ -0,0 +1,59 @@
|
|||
#!/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"
|
11
nginx.conf
Normal file
11
nginx.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __INSTALL_DIR__/;
|
||||
|
||||
client_max_body_size 10M;
|
||||
|
||||
# Include SSOWAT user panel's shortcut tile.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
20
remove
Normal file
20
remove
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
### App file generated with YoloGen, the YunoHost app generator, version .
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# REMOVE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Removing system configurations related to $app..."
|
||||
|
||||
ynh_config_remove_logrotate
|
||||
|
||||
ynh_config_remove_nginx
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression "Removal of $app completed"
|
44
restore
Normal file
44
restore
Normal file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
### App file generated with YoloGen, the YunoHost app generator, version .
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression "Restoring the app main directory..."
|
||||
|
||||
ynh_restore "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP DATABASE
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Restoring system configurations related to $app..."
|
||||
|
||||
ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
ynh_restore "/etc/logrotate.d/$app"
|
||||
|
||||
#=================================================
|
||||
# RESTORE VARIOUS FILES
|
||||
#=================================================
|
||||
|
||||
ynh_restore "/var/log/$app/"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression "Reloading NGINX web server and $app's service..."
|
||||
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression "Restoration completed for $app"
|
33
upgrade
Normal file
33
upgrade
Normal file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
### App file generated with YoloGen, the YunoHost app generator, version .
|
||||
|
||||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
|
||||
ynh_setup_source --dest_dir="$install_dir" --full_replace --keep=""
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
ynh_script_progression "Upgrading system configurations related to $app..."
|
||||
|
||||
ynh_config_add_nginx
|
||||
|
||||
ynh_config_add_logrotate
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression "Upgrade of $app completed"
|
Loading…
Add table
Reference in a new issue