1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/selfoss_ynh.git synced 2024-09-03 20:16:21 +02:00
selfoss_ynh/scripts/install

43 lines
1.3 KiB
Text
Raw Normal View History

2022-01-10 13:37:52 +01:00
#!/bin/bash
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression "Setting up source files..."
2022-01-10 13:37:52 +01:00
2023-03-10 12:48:48 +01:00
ynh_setup_source --dest_dir="$install_dir"
2022-01-10 13:37:52 +01:00
2023-03-10 12:48:48 +01:00
chmod g+w $install_dir/data/cache $install_dir/data/favicons $install_dir/data/logs $install_dir/data/thumbnails $install_dir/data/sqlite $install_dir/public
2022-01-10 13:37:52 +01:00
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression "Configuring PHP-FPM..."
2022-01-10 13:37:52 +01:00
ynh_config_add_phpfpm
2022-01-10 13:37:52 +01:00
ynh_config_add_nginx
2022-12-23 23:08:29 +01:00
2022-01-10 13:37:52 +01:00
#=================================================
# ADD A CONFIGURATION
#=================================================
ynh_script_progression "Adding $app's configuration..."
2022-01-10 13:37:52 +01:00
ynh_config_add --template="config.ini" --destination="$install_dir/config.ini"
2022-01-10 13:37:52 +01:00
#=================================================
# SETUP A CRON
#=================================================
ynh_script_progression "Setuping a cron..."
2022-01-10 13:37:52 +01:00
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
2022-01-10 13:37:52 +01:00
#=================================================
# END OF SCRIPT
#=================================================
ynh_script_progression "Installation of $app completed"