mirror of
https://github.com/YunoHost-Apps/archivist_ynh.git
synced 2024-09-03 18:15:55 +02:00
47 lines
1.6 KiB
Bash
Executable file
47 lines
1.6 KiB
Bash
Executable file
#!/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
|