forked from mikoto20000/railsgun
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathuninstall
More file actions
executable file
·57 lines (44 loc) · 1.24 KB
/
Copy pathuninstall
File metadata and controls
executable file
·57 lines (44 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
GEM=`which gem2.0`
if [ "$GEM" = "" ]
then
GEM=gem
fi
echo "ALMiniumをアンインストールします。"
echo ""
echo -n "データベース(全てのRedmineの情報)とリポジトリを削除しますか?(y/N)"
read YN
if [ "$YN" = "y" ]
then
mysql alminium -e "REVOKE ALL ON alminium.* FROM alminium@localhost"
mysql alminium -e "DELETE FROM mysql.user WHERE User LIKE 'alminium'"
mysql alminium -e "FLUSH PRIVILEGES"
mysql alminium -e "DROP DATABASE alminium"
rm -fr /opt/alminium /var/opt/alminium
fi
echo ""
echo -n "Apacheの設定を削除しますか?(y/N)"
read YN
if [ "$YN" = "y" ]
then
rm -fr /etc/httpd/conf.d/{alminium,passenger}.conf
rm -fr /etc/apache2/conf.d/{alminium,passenger}.conf
rm -fr /etc/apache2/sites-{available,enabled}/alminium.conf
rm -fr /etc/apache2/mods-{available,enabled}/passenger.load
rm -fr /opt/local/apache2/conf/{alminium,passenger}.conf
rm -fr /etc/opt/alminium
fi
echo ""
echo -n "Jenkisとその設定を削除しますか?(y/N)"
read YN
if [ "$YN" = "y" ]
then
source jenkins/setup/uninstall.sh
fi
echo ""
echo -n "キャッシュされたファイルを削除しますか?(y/N)"
read YN
if [ "$YN" = "y" ]
then
rm -fr cache *.installed
fi