From 24052457bbabf197b2c4e1745f45901fa9e247f2 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Mon, 23 Nov 2015 00:11:07 +0100 Subject: [PATCH 1/3] remove duplicated service gogs restart in the update part --- gogs-root.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gogs-root.sh b/gogs-root.sh index 63d964a..cc0bda9 100755 --- a/gogs-root.sh +++ b/gogs-root.sh @@ -1,21 +1,21 @@ #!/bin/tcsh echo "FreeNAS Gogs installation script." echo "This has been tested on:" -echo " 9.3-RELEASE-p5 FreeBSD 9.3-RELEASE-p5 #1" -echo " f8ed4e8: Fri Dec 19 20:25:35 PST 2014" +echo " 9.3-RELEASE-p29 FreeBSD" +echo echo echo "Press any key to begin" set jnk = $< -if ( -f /usr/locat/etc/rc.d/gogs ) then - echo "Updating Gogs..." +if ( -f /usr/local/etc/rc.d/gogs ) then + echo "Gogs Install found. Updating..." echo # Stop Gogs service service gogs stop - gogs-compile.sh - service gogs start + ./gogs-compile.sh echo "Update Done!" else + echo "Install Gogs from zero" # 3) Enable SSH echo "Enabling SSH" /usr/bin/sed -i '.bak' 's/sshd_enable="NO"/sshd_enable="YES"/g' /etc/rc.conf From ea621c31fc299b127ec5caf07430e87405701287 Mon Sep 17 00:00:00 2001 From: Yorick Date: Mon, 10 Oct 2016 11:14:28 +0200 Subject: [PATCH 2/3] Tested with FreeNAS 9.10 --- gogs-root.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gogs-root.sh b/gogs-root.sh index c697bad..14fe9e7 100755 --- a/gogs-root.sh +++ b/gogs-root.sh @@ -1,11 +1,7 @@ #!/bin/tcsh echo "FreeNAS Gogs installation script." echo "This has been tested on:" -<<<<<<< HEAD -echo " 9.3-RELEASE-p29" -======= -echo " 9.3-RELEASE-p29 FreeBSD" ->>>>>>> 24052457bbabf197b2c4e1745f45901fa9e247f2 +echo " FreeNAS 9.10" echo echo echo "Press any key to begin" From 8e5a1fc85b84174ff066ef2a6c309b4b532076b9 Mon Sep 17 00:00:00 2001 From: Yorick Date: Mon, 10 Oct 2016 11:16:35 +0200 Subject: [PATCH 3/3] Package update and upgrade done before installing / updating --- gogs-root.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gogs-root.sh b/gogs-root.sh index 14fe9e7..0e1d29a 100755 --- a/gogs-root.sh +++ b/gogs-root.sh @@ -7,6 +7,9 @@ echo echo "Press any key to begin" set jnk = $< +echo "Updatiing system ..." +/usr/sbin/pkg update -f && /usr/sbin/pkg upgrade -y + if ( -f /usr/local/etc/rc.d/gogs ) then echo "Gogs Install found. Updating..." echo @@ -26,10 +29,6 @@ else echo "Starting SSH Service" /usr/sbin/service sshd start # 4) Update packages and upgrade any. - echo "Updating packages" - /usr/sbin/pkg update -f - echo "Upgrading packages" - /usr/sbin/pkg upgrade -y echo "Installing memcached, redis & go" /usr/sbin/pkg install -y memcached redis go git bash echo "Enabling & starting memcached & redis"