mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
cleaning
This commit is contained in:
parent
3274b1cf07
commit
6b192d01e3
3 changed files with 9 additions and 31 deletions
|
@ -19,7 +19,7 @@ ynh_change_url_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC MODIFICATIONS
|
# SPECIFIC MODIFICATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Applying Nextcloud specific modifications..." --weight=2
|
ynh_script_progression --message="Applying $app specific modifications..." --weight=2
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
# Define a function to execute commands with `occ`
|
||||||
exec_occ() {
|
exec_occ() {
|
||||||
|
|
|
@ -39,7 +39,7 @@ ynh_mysql_connect_as --user=$db_user --password="$db_pwd" --database=$db_name \
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..."
|
ynh_script_progression --message="Setting up source files..." --weight=5
|
||||||
|
|
||||||
# Load the last available version
|
# Load the last available version
|
||||||
source upgrade.d/upgrade.last.sh
|
source upgrade.d/upgrade.last.sh
|
||||||
|
@ -86,7 +86,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL NEXTCLOUD
|
# INSTALL NEXTCLOUD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing Nextcloud..." --weight=30
|
ynh_script_progression --message="Installing $app..." --weight=30
|
||||||
|
|
||||||
# Define a function to execute commands with `occ`
|
# Define a function to execute commands with `occ`
|
||||||
exec_occ() {
|
exec_occ() {
|
||||||
|
@ -113,7 +113,7 @@ exec_occ maintenance:install \
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE NEXTCLOUD
|
# CONFIGURE NEXTCLOUD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring Nextcloud..." --weight=8
|
ynh_script_progression --message="Configuring $app..." --weight=8
|
||||||
|
|
||||||
# Set the mysql.utf8mb4 config to true in config.php
|
# Set the mysql.utf8mb4 config to true in config.php
|
||||||
exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true"
|
exec_occ config:system:set mysql.utf8mb4 --type boolean --value="true"
|
||||||
|
|
|
@ -10,51 +10,29 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE NGINX CONFIGURATION
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing NGINX web server configuration..."
|
# REMOVE SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=5
|
||||||
|
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE PHP-FPM CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2
|
|
||||||
|
|
||||||
# Remove the dedicated PHP-FPM config
|
# Remove the dedicated PHP-FPM config
|
||||||
ynh_remove_fpm_config
|
ynh_remove_fpm_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE LOGROTATE CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing logrotate configuration..."
|
|
||||||
|
|
||||||
# Remove the app-specific logrotate config
|
# Remove the app-specific logrotate config
|
||||||
ynh_remove_logrotate
|
ynh_remove_logrotate
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE FAIL2BAN CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=8
|
|
||||||
|
|
||||||
# Remove the dedicated Fail2Ban config
|
# Remove the dedicated Fail2Ban config
|
||||||
ynh_remove_fail2ban_config
|
ynh_remove_fail2ban_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC REMOVE
|
|
||||||
#=================================================
|
|
||||||
# REMOVE THE CRON FILE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Remove a cron file
|
# Remove a cron file
|
||||||
# TODO: Ensure that cron job is not running (How !?)
|
# TODO: Ensure that cron job is not running (How !?)
|
||||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
# Cleaning ACL in home directories
|
||||||
# CLEAN ACL IN HOME DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
for i in $(ls /home); do
|
for i in $(ls /home); do
|
||||||
# Clean ACL in every directories in /home, except those which start with 'yunohost.'
|
# Clean ACL in every directories in /home, except those which start with 'yunohost.'
|
||||||
[[ ! $i == yunohost.* ]] \
|
[[ ! $i == yunohost.* ]] \
|
||||||
|
|
Loading…
Add table
Reference in a new issue