diff --git a/README.md b/README.md index 46f5b7f..e293de0 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Current Movim version : 0.9 git2015-08-27 0.9b 2015-08-27 - Update to Movim 0.9 git2015-08-27 - Add notes in README about public pods & whitelisting +- Remove script now delete Movim php5-fpm pool. +- Remove script delete 'movim' user after shutting down Movim service. 0.8b 2015-08-24 - Added language selection : ar, de, es, it, ja, nl, ru diff --git a/TODO b/TODO index f19d58f..652b478 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ - Edit proxy_read_timeout and proxy_send_timeout values - Check if path is not empty beforce install - Add pid and syslog in movim.service (systemd) -- In remove script delete user after shuting down Movim service -- In remove script delete php5-fpm pool - Set timezone in php5-fpm pool diff --git a/q b/q new file mode 100644 index 0000000..64feaa5 --- /dev/null +++ b/q @@ -0,0 +1,25 @@ +#!/bin/bash + +db_user=movim +db_name=movim +root_pwd=$(sudo cat /etc/yunohost/mysql) + +#Stop service and remove init +sudo /etc/init.d/movim stop +sudo systemctl stop movim.service +sudo systemctl disable movim.service +sudo update-rc.d -f movim remove +sudo rm /etc/init.d/movim +sudo rm /lib/systemd/system/movim.service + +#Drop database, movim files and user. +mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" +sudo userdel movim +sudo rm -rf /var/www/movim +domain=$(sudo yunohost app setting movim domain) +sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf +sudo rm -f /etc/nginx. + +# Restarting services +sudo service nginx reload +sudo service php5-fpm restart diff --git a/scripts/remove b/scripts/remove index 881dbbc..1ad9a78 100644 --- a/scripts/remove +++ b/scripts/remove @@ -3,15 +3,8 @@ db_user=movim db_name=movim root_pwd=$(sudo cat /etc/yunohost/mysql) -mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" -# Removing executable files and user -sudo userdel movim -sudo rm -rf /var/www/movim -domain=$(sudo yunohost app setting movim domain) -sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf - -#REMOVE INIT +#Stop service and remove init sudo /etc/init.d/movim stop sudo systemctl stop movim.service sudo systemctl disable movim.service @@ -19,5 +12,14 @@ sudo update-rc.d -f movim remove sudo rm /etc/init.d/movim sudo rm /lib/systemd/system/movim.service +#Drop database, movim files and user. +mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" +sudo userdel movim +sudo rm -rf /var/www/movim +domain=$(sudo yunohost app setting movim domain) +sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf +udo rm etc/php5/fpm/pool.d/movim.conf + # Restarting services sudo service nginx reload +sudo service php5-fpm restart