-
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.
[autopatch] Automatic patch attempt for helpers 2.1
- Loading branch information
Showing
9 changed files
with
104 additions
and
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*~ | ||
*.sw[op] | ||
.DS_Store |
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,13 @@ | ||
#!/bin/bash | ||
|
||
#================================================= | ||
# COMMON VARIABLES | ||
# COMMON VARIABLES AND CUSTOM HELPERS | ||
#================================================= | ||
ynh_arch="$YNH_ARCH" | ||
|
||
#================================================= | ||
# PERSONAL HELPERS | ||
#================================================= | ||
|
||
myynh_set_permissions () { | ||
chown -R $app: "$install_dir" | ||
chmod 750 "$install_dir" | ||
chmod -R o-rwx "$install_dir" | ||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app: "$install_dir" | ||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir" | ||
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" | ||
chmod -R +x "$install_dir/bin/" | ||
} | ||
|
||
#================================================= | ||
# EXPERIMENTAL HELPERS | ||
#================================================= | ||
|
||
#================================================= | ||
# FUTURE OFFICIAL HELPERS | ||
#================================================= |
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
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,44 +1,39 @@ | ||
#!/bin/bash | ||
|
||
#================================================= | ||
# GENERIC START | ||
#================================================= | ||
# IMPORT GENERIC HELPERS | ||
#================================================= | ||
|
||
source _common.sh | ||
source /usr/share/yunohost/helpers | ||
|
||
#================================================= | ||
# REMOVE SYSTEM CONFIGURATIONS | ||
#================================================= | ||
# REMOVE SYSTEMD SERVICE | ||
# REMOVE SYSTEMD SERVICE | ||
|
||
#================================================= | ||
|
||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 | ||
ynh_script_progression "Removing system configurations related to $app..." | ||
|
||
if ynh_exec_warn_less yunohost service status "scrutiny-web-server" >/dev/null | ||
if ynh_hide_warnings yunohost service status "scrutiny-web-server" >/dev/null | ||
then | ||
ynh_script_progression --message="Removing scrutiny-web-server service integration..." --weight=1 | ||
ynh_script_progression "Removing scrutiny-web-server service integration..." | ||
yunohost service remove "scrutiny-web-server" | ||
fi | ||
|
||
if ynh_exec_warn_less yunohost service status "scrutiny-collector" >/dev/null | ||
if ynh_hide_warnings yunohost service status "scrutiny-collector" >/dev/null | ||
then | ||
ynh_script_progression --message="Removing scrutiny-collector service integration..." --weight=1 | ||
ynh_script_progression "Removing scrutiny-collector service integration..." | ||
yunohost service remove "scrutiny-collector" | ||
fi | ||
|
||
ynh_remove_systemd_config --service="scrutiny-web-server" | ||
ynh_remove_systemd_config --service="scrutiny-collector" | ||
ynh_secure_remove --file="/etc/systemd/system/scrutiny-collector.timer" | ||
ynh_config_remove_systemd"scrutiny-web-server" | ||
ynh_config_remove_systemd"scrutiny-collector" | ||
ynh_safe_rm "/etc/systemd/system/scrutiny-collector.timer" | ||
|
||
ynh_remove_nginx_config | ||
ynh_config_remove_nginx | ||
|
||
ynh_remove_logrotate | ||
ynh_config_remove_logrotate | ||
|
||
#================================================= | ||
# END OF SCRIPT | ||
#================================================= | ||
|
||
ynh_script_progression --message="Removal of $app completed" --last | ||
ynh_script_progression "Removal of $app completed" |
Oops, something went wrong.