-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sylvain
committed
Sep 14, 2024
1 parent
02a496b
commit f4e912d
Showing
8 changed files
with
120 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,15 @@ | ||
#!/bin/bash | ||
|
||
#================================================= | ||
# COMMON VARIABLES | ||
#================================================= | ||
ynh_arch="$YNH_ARCH" | ||
|
||
#================================================= | ||
# PERSONAL HELPERS | ||
# COMMON VARIABLES AND CUSTOM HELPERS | ||
#================================================= | ||
|
||
myynh_set_permissions () { | ||
chown -R $app: "$install_dir" | ||
chmod 750 "$install_dir" | ||
chmod -R o-rwx "$install_dir" | ||
chmod -R +x "$install_dir/bin/" | ||
} | ||
|
||
#================================================= | ||
# EXPERIMENTAL HELPERS | ||
#================================================= | ||
chown -R $app: "$install_dir" | ||
chmod u=rwX,g=rX,o= "$install_dir" | ||
chmod -R o-rwx "$install_dir" | ||
chmod -R +x "$install_dir/bin/" | ||
|
||
#================================================= | ||
# FUTURE OFFICIAL HELPERS | ||
#================================================= | ||
chown $app:root "/var/log/$app" | ||
chmod -R u=rwX,g=rX,o= "/var/log/$app" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,41 @@ | ||
#!/bin/bash | ||
|
||
#================================================= | ||
# GENERIC START | ||
#================================================= | ||
# IMPORT GENERIC HELPERS | ||
#================================================= | ||
|
||
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..." | ||
ynh_print_info "Declaring files to be backed up..." | ||
|
||
#================================================= | ||
# BACKUP THE APP MAIN DIR | ||
#================================================= | ||
|
||
ynh_backup --src_path="$install_dir" | ||
ynh_backup "$install_dir" | ||
|
||
#================================================= | ||
# BACKUP THE NGINX CONFIGURATION | ||
#================================================= | ||
|
||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" | ||
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" | ||
|
||
#================================================= | ||
# SPECIFIC BACKUP | ||
#================================================= | ||
# BACKUP LOGROTATE | ||
#================================================= | ||
|
||
ynh_backup --src_path="/etc/logrotate.d/$app" | ||
ynh_backup --src_path="/var/log/$app" | ||
ynh_backup "/etc/logrotate.d/$app" | ||
ynh_backup "/var/log/$app" | ||
|
||
#================================================= | ||
# BACKUP SYSTEMD | ||
#================================================= | ||
|
||
ynh_backup --src_path="/etc/systemd/system/scrutiny-web-server.service" | ||
ynh_backup --src_path="/etc/systemd/system/scrutiny-collector.service" | ||
ynh_backup --src_path="/etc/systemd/system/scrutiny-collector.timer" | ||
ynh_backup "/etc/systemd/system/scrutiny-web-server.service" | ||
ynh_backup "/etc/systemd/system/scrutiny-collector.service" | ||
ynh_backup "/etc/systemd/system/scrutiny-collector.timer" | ||
|
||
#================================================= | ||
# END OF SCRIPT | ||
#================================================= | ||
|
||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." | ||
ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.