1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/castopod_ynh.git synced 2024-09-03 18:16:14 +02:00
This commit is contained in:
ericgaspar 2021-04-03 10:11:48 +02:00
parent e37e7ad94c
commit 21f914ff92
No known key found for this signature in database
GPG key ID: 574F281483054D44
5 changed files with 27 additions and 0 deletions

1
conf/cron Normal file
View file

@ -0,0 +1 @@
* * * * * /usr/bin/php__PHPVERSION__ __FINALPATH__/public/index.php scheduled-activities

View file

@ -45,6 +45,12 @@ ynh_backup --src_path="$final_path"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/cron.d/$app"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================

View file

@ -98,6 +98,13 @@ ynh_script_progression --message="Configuring Castopod..." --weight=1
ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env"
#=================================================
# SETUP A CRON
#=================================================
ynh_script_progression --message="Setuping a cron..."
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -53,6 +53,13 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
# Remove the dedicated PHP-FPM config
ynh_remove_fpm_config
#=================================================
# REMOVE VARIOUS FILES
#=================================================
# Remove a cron file
ynh_secure_remove --file="/etc/cron.d/$app"
#=================================================
# GENERIC FINALIZATION
#=================================================

View file

@ -91,6 +91,12 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
# GENERIC FINALIZATION
#=================================================