Remove gogs user if it already exists

This commit is contained in:
Bob Mottram 2016-05-08 17:41:56 +01:00
parent 5765abcc55
commit 5794a63df0
1 changed files with 7 additions and 0 deletions

View File

@ -6417,6 +6417,13 @@ function install_gogs {
rm -rf $GOPATH/src/github.com/gogits
fi
if [ -d /home/gogs ]; then
userdel -r gogs
fi
if [ -d /home/gogs ]; then
rm -rf /home/gogs
fi
# add a gogs user account
adduser --disabled-login --gecos 'Gogs' git