easyappointments_ynh/scripts/install

43 lines
1.8 KiB
Text
Raw Normal View History

2021-08-13 15:48:24 +03:00
#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
2021-08-13 15:48:24 +03:00
2023-03-29 20:23:48 +03:00
ynh_setup_source --dest_dir="$install_dir"
2021-08-13 15:48:24 +03:00
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
2023-03-29 20:23:48 +03:00
chmod -R 770 "$install_dir/storage"
2021-08-13 15:48:24 +03:00
#=================================================
2023-09-10 10:02:49 +03:00
# SYSTEM CONFIGURATION
2021-08-13 15:48:24 +03:00
#=================================================
ynh_script_progression "Adding system configurations related to $app..."
2021-08-13 15:48:24 +03:00
ynh_config_add_nginx
2021-08-13 15:48:24 +03:00
ynh_config_add_phpfpm
2021-08-13 15:48:24 +03:00
#=================================================
# SPECIFIC SETUP
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration..."
2021-08-13 15:48:24 +03:00
ynh_config_add --template="config.php" --destination="$install_dir/config.php"
2021-08-13 15:48:24 +03:00
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/config.php"
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown $app "$install_dir/config.php"
2021-08-13 15:48:24 +03:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"