1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/motioneye_ynh.git synced 2024-09-03 19:46:09 +02:00
motioneye_ynh/scripts/backup
Carlos Orama c3dcb5dcbc
Installation Tests (#11)
* fixed config destination typo

* $final_path not bound, attepting "__APP__"

* test: hard Coded directory

* changed install and data dir references

* I thought I had replaced etc/ with /etc

* added python3-venv to dependencies

* moved asset to install

* undo source removal

* debug: list all files in install dir

* use local downloaded dev.tar.gz

* update source reference to specific commit + no extract

* updated manifest for fixes and info + systemd correct directory

* Auto-update README

* Update manifest.toml (Fixed CPE)

Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>

* Version to date ver

Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>

* Auto-update README

* install: changed permissions

* 660->664

* install: 664->666 chown commented

* chown+777 (this does not feel right)

* following motionEye's base (664 + motion:motion)

* Auto-update README

* moved permissions

* add motion to dependencies

* permission tests continue

* 777 again

* retry

* reordered folder making

* Linter (#12) by ericgaspar

* linter

* Auto-update README

* Update LICENSE

* Update manifest.toml

* Auto-update README

* Update manifest.toml

* cleaning

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Auto-update README

* v0.43.1b1 download test

* fixed miss-quote

* Auto-update README

* Update manifest.toml

* clean up?

* __APP__ -> $app

* venv, ip fix and ram fix

* run directory

* test install dir run

* logs in app dir (should change later)

* force-create directories (shouldn't these be made?)

* updated folders, upgrade, restore and install usage

* corrected directory references

* what if we cant use /path?

* fixed description

* Auto-update README

* minimized screenshot to be less than 512k

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>
Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com>
2024-01-17 14:09:30 +00:00

55 lines
1.8 KiB
Bash
Executable file

#!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
# Only relevant if there is a "data_dir" resource for this app
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# BACKUP THE NGINX CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP LOGROTATE
#=================================================
ynh_backup --src_path="/etc/logrotate.d/$app"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# END OF SCRIPT
#=================================================
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."