| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #!/bin/bash
- #=================================================
- # IMPORT GENERIC HELPERS
- #=================================================
- # Load common variables for all scripts.
- source scripts/_common.sh
- source /usr/share/yunohost/helpers
- _set_frequencies
- #=================================================
- # DOWNLOAD, CHECK AND UNPACK SOURCE
- #=================================================
- ynh_script_progression --message="Resetting source files..." --time --weight=1
- # Download, check integrity, uncompress and patch the source from app.src
- (cd scripts; YNH_CWD=$PWD ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="passkey Backup_list.conf")
- # Set permissions on app files
- chown -R "root:root" "$install_dir"
- #=================================================
- # RECONFIGURE ARCHIVIST
- #=================================================
- ynh_script_progression --message="Reconfiguring archivist..." --time --weight=1
- yunohost app action run "$app" reset_default_config
- #=================================================
- # SYSTEM CONFIGURATION
- #=================================================
- ynh_script_progression --message="Resetting system configurations related to $app..." --weight=1
- # Use logrotate to manage application logfile(s)
- ynh_use_logrotate
- # Add Cron configuration file
- ynh_add_config --template="archivist.cron" --destination="/etc/cron.d/$app"
- #=================================================
- # END OF SCRIPT
- #=================================================
- ynh_script_progression --message="Execution completed" --time --last
|