1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

Don't backup app directory and message on remove

This commit is contained in:
anmol26s 2018-06-27 13:25:37 +05:30
parent b2707e6df1
commit b93488af69
4 changed files with 24 additions and 17 deletions

View file

@ -45,11 +45,6 @@ systemctl stop "$app"
ynh_backup "$final_path" ynh_backup "$final_path"
# Copy the data directory
datadir="/home/yunohost.app/${app}/storage"
ynh_backup "$datadir"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION
#================================================= #=================================================

View file

@ -236,12 +236,12 @@ systemctl start "$app"
# SEND A README FOR THE ADMIN # SEND A README FOR THE ADMIN
#================================================= #=================================================
message="PeerTube was successfully installed :) message=" $app was successfully installed :)
Please open 'https://$domain$path_url' Please open https://$domain$path_url
The admin username is: root The admin username is: root
Here is the admin password: '$admin_pass' Here is the admin password: $admin_pass
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh" If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh"

View file

@ -63,7 +63,6 @@ ynh_psql_remove_db "$db_name" "$app"
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove "$final_path" ynh_secure_remove "$final_path"
ynh_secure_remove /home/yunohost.app/"$app"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
@ -78,7 +77,6 @@ ynh_remove_nginx_config
# Remove the app-specific logrotate config # Remove the app-specific logrotate config
ynh_remove_logrotate ynh_remove_logrotate
ynh_secure_remove /var/log/"$app"
#================================================= #=================================================
# CLOSE A PORT # CLOSE A PORT
@ -102,3 +100,23 @@ fi
# Delete a system user # Delete a system user
ynh_system_user_delete "$app" ynh_system_user_delete "$app"
#=================================================
# SEND A README FOR THE ADMIN
#=================================================
message="$app was successfully removed :)
$app was successfully removed and domain https://$domain$path_url is free for other apps now.
But there is futher action needed from your side to completely remove the $app data. If you are planing to restore the app in the future don't run the command given below. If you are going to switch to othe server don't forget to copy /home/yunohost.app/$app to your new server.
You need to run this command to remove the data (warning all your videos will be removed) :
rm -R /home/yunohost.app/$app -f
If you facing an issue or want to improve this app, please open a new issue in this project: https://github.com/YunoHost-Apps/peertube_ynh"
ynh_send_readme_to_admin "$message"

View file

@ -62,9 +62,6 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file "$final_path" ynh_restore_file "$final_path"
datadir="/home/yunohost.app/${app}/storage"
ynh_restore_file "$datadir"
# Open this port # Open this port
yunohost firewall allow Both "$port" 2>&1 yunohost firewall allow Both "$port" 2>&1
@ -80,8 +77,7 @@ ynh_system_user_create "$app"
#================================================= #=================================================
# Set right permissions # Set right permissions
datadir="/home/yunohost.app/${app}/storage" chown -R "$app":"$app" "/home/yunohost.app/${app}/storage"
chown -R "$app":"$app" "$datadir"
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
@ -89,8 +85,6 @@ chown -R "$app":"$app" "$datadir"
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES
#================================================= #=================================================
# install yarn
# install nodejs # install nodejs
ynh_install_nodejs 8 ynh_install_nodejs 8