diff --git a/src/freedombone b/src/freedombone index 8c49ccb0..308be9ec 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6379,6 +6379,9 @@ function upgrade_golang { # add a gogs user account within which the gvm home directory will exist adduser --disabled-login --gecos 'Gogs' git fi + if [ -d /home/git/Maildir ]; then + rm -rf /home/git/Maildir + fi # TODO: this script is all over the place # and contains hardcoded github. See if you can do better @@ -6438,10 +6441,21 @@ function install_gogs { # http://gogs.io/docs/installation/install_from_source.md + if [ -d $GOPATH/src/github.com/gogits ]; then + rm -rf $GOPATH/src/github.com/gogits + fi + + if [ -d /home/git/gogs-repositories ]; then + rm -rf /home/git/gogs-repositories + fi + if [ ! -d /home/git ]; then # add a gogs user account adduser --disabled-login --gecos 'Gogs' git fi + if [ -d /home/git/Maildir ]; then + rm -rf /home/git/Maildir + fi if [ -d $GOPATH/src/github.com/gogits ]; then rm -rf $GOPATH/src/github.com/gogits