|
@@ -35,6 +35,31 @@ GIT_DOMAIN_REPO="https://github.com/gogits/gogs"
|
35
|
35
|
GIT_ADMIN_PASSWORD=
|
36
|
36
|
GOGS_COMMIT='3fb4f7f4980b4339fd9ef6a3ba5b0acab83d264d'
|
37
|
37
|
|
|
38
|
+function remove_gogs {
|
|
39
|
+ if ! grep -Fxq "install_gogs" $COMPLETION_FILE; then
|
|
40
|
+ return
|
|
41
|
+ fi
|
|
42
|
+ function_check select_go_version
|
|
43
|
+ select_go_version
|
|
44
|
+
|
|
45
|
+ systemctl stop gogs
|
|
46
|
+ systemctl disable gogs
|
|
47
|
+ nginx_dissite $GIT_DOMAIN_NAME
|
|
48
|
+ if [ -d /var/www/$GIT_DOMAIN_NAME ]; then
|
|
49
|
+ rm -rf /var/www/$GIT_DOMAIN_NAME
|
|
50
|
+ fi
|
|
51
|
+ if [ -f /etc/nginx/sites-available/$GIT_DOMAIN_NAME ]; then
|
|
52
|
+ rm /etc/nginx/sites-available/$GIT_DOMAIN_NAME
|
|
53
|
+ fi
|
|
54
|
+ function_check drop_database
|
|
55
|
+ drop_database gogs
|
|
56
|
+ rm /etc/systemd/system/gogs.service
|
|
57
|
+ rm -rf $GOPATH/src/github.com/gogits
|
|
58
|
+ userdel -r git
|
|
59
|
+ sed -i '/install_gogs/d' $COMPLETION_FILE
|
|
60
|
+ sed -i '/Gogs /d' $COMPLETION_FILE
|
|
61
|
+}
|
|
62
|
+
|
38
|
63
|
function install_gogs {
|
39
|
64
|
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_CHAT" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
40
|
65
|
return
|