copy rc.d script done by compile()
This commit is contained in:
parent
adc9162d3a
commit
5bb7d164d8
1 changed files with 8 additions and 7 deletions
|
@ -13,13 +13,14 @@ else
|
||||||
install()
|
install()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
update () {a
|
update () {
|
||||||
echo "Updating Gogs..."
|
echo "Updating Gogs..."
|
||||||
echo
|
echo
|
||||||
# Stop Gogs service
|
# Stop Gogs service
|
||||||
service gogs stop
|
service gogs stop
|
||||||
compile()
|
compile()
|
||||||
service gogs start
|
service gogs start
|
||||||
|
echo "Update Done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
install {
|
install {
|
||||||
|
@ -58,14 +59,9 @@ install {
|
||||||
compile ()
|
compile ()
|
||||||
su - git -c "ln -s /usr/home/git/.ssh/ /usr/home/git/gogs/"
|
su - git -c "ln -s /usr/home/git/.ssh/ /usr/home/git/gogs/"
|
||||||
# 7) Start up scripts
|
# 7) Start up scripts
|
||||||
echo "Copying startup script to rc.d, enabling & starting gogs"
|
|
||||||
#/usr/bin/sed 's/\/home\/git/\/home\/git\/gogs/g' /home/git/go/src/github.com/gogits/gogs/scripts/init/freebsd/gogs
|
|
||||||
cp /home/git/go/src/github.com/gogits/gogs/scripts/init/freebsd/gogs /usr/local/etc/rc.d/
|
|
||||||
sed -i -e 's/\/home\/git/\/home\/git\/gogs/g' /usr/local/etc/rc.d/gogs
|
|
||||||
chmod +x /usr/local/etc/rc.d/gogs
|
|
||||||
echo gogs_enable="YES" >> /etc/rc.conf
|
echo gogs_enable="YES" >> /etc/rc.conf
|
||||||
service gogs start
|
service gogs start
|
||||||
}
|
}
|
||||||
|
|
||||||
compile() {
|
compile() {
|
||||||
echo "Fetching gogs from Github"
|
echo "Fetching gogs from Github"
|
||||||
|
@ -78,6 +74,11 @@ compile() {
|
||||||
su - git -c "cp -R /usr/home/git/go/src/github.com/gogits/gogs /home/git/"
|
su - git -c "cp -R /usr/home/git/go/src/github.com/gogits/gogs /home/git/"
|
||||||
# Change ownership of everything in the git directory
|
# Change ownership of everything in the git directory
|
||||||
chown -R git:git /usr/home/git/
|
chown -R git:git /usr/home/git/
|
||||||
|
echo "Copying startup script to rc.d, enabling & starting gogs"
|
||||||
|
#/usr/bin/sed 's/\/home\/git/\/home\/git\/gogs/g' /home/git/go/src/github.com/gogits/gogs/scripts/init/freebsd/gogs
|
||||||
|
cp /home/git/go/src/github.com/gogits/gogs/scripts/init/freebsd/gogs /usr/local/etc/rc.d/
|
||||||
|
sed -i -e 's/\/home\/git/\/home\/git\/gogs/g' /usr/local/etc/rc.d/gogs
|
||||||
|
chmod +x /usr/local/etc/rc.d/gogs
|
||||||
}
|
}
|
||||||
|
|
||||||
echo
|
echo
|
Reference in a new issue