mirror of
https://github.com/haiwen/seafile-server-installer-cn
synced 2024-09-20 08:15:28 +00:00
56 lines
1.9 KiB
Bash
56 lines
1.9 KiB
Bash
#!/bin/bash
|
|
#
|
|
# seafile-server-installer/seafile-ce_uberspace_uninstall
|
|
#
|
|
# Copyright 2015, Alexander Jackson <alexander.jackson@seafile.de>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
#
|
|
#set -x
|
|
# Vars
|
|
SILENCER='> /dev/null 2>&1'
|
|
|
|
# -------------------------------------------
|
|
# Seafile Server Community Edition on Uberspace
|
|
# -------------------------------------------
|
|
clear
|
|
cat <<EOF
|
|
This script deletes Seafile Server on Uberspace
|
|
-----------------------------------------------------------------
|
|
Make 100% sure you saved the content from your
|
|
libraries before proceeding with the full removal.
|
|
|
|
For questions or suggestions please contact me at
|
|
alexander.jackson@seafile.de
|
|
-----------------------------------------------------------------
|
|
Hit return to uninstall Seafile or CTRL-C to abort.
|
|
EOF
|
|
read dummy
|
|
clear
|
|
|
|
# Kill anything Seafile related
|
|
ps aux | grep sea | grep -v grep | grep -v uninstall | awk '{ print $2 }' | while read line; do kill $line ; done
|
|
|
|
# remove Seafile, Apache and Python 2.7 related directories and files
|
|
eval rm -r ~/seafile-ce_* ~/seafile/ ~/bin/seafile* ~/fcgi-bin/seahub* ~/html/.htaccess ~/bin ~/lib/python2.7 ${SILENCER}
|
|
|
|
# Drop databases
|
|
for i in haiwen_ccnet haiwen_seafile haiwen_seahub; do
|
|
mysql -e "DROP DATABASE IF EXISTS \`${i}\`;"
|
|
done
|
|
|
|
# Confirm removal
|
|
echo Seafile is uninstalled now...
|