2015-08-03 12:05:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-07-10 16:24:09 +02:00
|
|
|
app="movim"
|
|
|
|
|
|
|
|
# Source YunoHost helpers
|
|
|
|
source /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
# Retrieve app settings
|
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
2015-08-03 12:05:52 +02:00
|
|
|
|
2016-07-10 16:24:09 +02:00
|
|
|
# Stop service and remove init
|
2015-09-03 17:24:46 +02:00
|
|
|
sudo service php5-fpm stop
|
2015-08-03 12:07:36 +02:00
|
|
|
sudo /etc/init.d/movim stop
|
2015-08-19 14:17:52 +02:00
|
|
|
sudo systemctl stop movim.service
|
|
|
|
sudo systemctl disable movim.service
|
2015-08-04 10:50:43 +02:00
|
|
|
sudo update-rc.d -f movim remove
|
2015-09-10 16:37:25 +02:00
|
|
|
sudo rm -f /etc/init.d/movim
|
|
|
|
sudo rm -f /lib/systemd/system/movim.service
|
2015-08-03 12:05:52 +02:00
|
|
|
|
2016-07-10 16:24:09 +02:00
|
|
|
# Drop MySQL database and user
|
|
|
|
db_user=movim
|
|
|
|
db_name=movim
|
|
|
|
ynh_mysql_drop_db "$db_name" || true
|
|
|
|
ynh_mysql_drop_user "$db_user" || true
|
|
|
|
|
|
|
|
# Remove Movim files and user
|
|
|
|
ynh_system_user_exists movim \
|
|
|
|
&& sudo userdel movim
|
2015-08-27 07:37:28 +02:00
|
|
|
sudo rm -rf /var/www/movim
|
2016-07-10 16:24:09 +02:00
|
|
|
|
|
|
|
# Remove nginx and php-fpm configuration files
|
2015-08-27 07:37:28 +02:00
|
|
|
sudo rm -f /etc/nginx/conf.d/$domain.d/movim.conf
|
2016-07-10 16:24:09 +02:00
|
|
|
sudo rm -f /etc/php5/fpm/pool.d/movim.conf
|
2015-08-27 07:37:28 +02:00
|
|
|
|
2015-08-03 12:05:52 +02:00
|
|
|
# Restarting services
|
|
|
|
sudo service nginx reload
|
2015-09-03 17:24:46 +02:00
|
|
|
sudo service php5-fpm start
|