From 6a7979e5155648f08ab6c5c89b2ec481d0ff26a7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 18 Mar 2015 21:36:31 +0000 Subject: [PATCH] Try systemd start for gogs --- src/freedombone | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/freedombone b/src/freedombone index ca7b73f0..e6499256 100755 --- a/src/freedombone +++ b/src/freedombone @@ -6713,17 +6713,20 @@ quit" > $INSTALL_DIR/batch.sql mysql -u root --password="$MARIADB_PASSWORD" < $INSTALL_DIR/batch.sql shred -zu $INSTALL_DIR/batch.sql - cp $GOPATH/src/github.com/gogits/gogs/scripts/init/debian/gogs /etc/init.d/ - sed -i 's/# Required-Start: $syslog $network/# Required-Start: $syslog $network $local_fs nginx/g' /etc/init.d/gogs - sed -i 's/# Required-Stop: $syslog/# Required-Stop: $syslog $local_fs/g' /etc/init.d/gogs - sed -i 's|WORKINGDIR=.*|WORKINGDIR=/home/git/go/src/github.com/gogits/gogs|g' /etc/init.d/gogs - chown git:git /etc/init.d/gogs chown -R git:git /home/git + cp $GOPATH/src/github.com/gogits/gogs/scripts/systemd/gogs.service /etc/systemd/ + sed -i 's|#After=mysqld.service|After=mysqld.service|g' /etc/systemd/gogs.service + systemd restart gogs - chmod ug+x /etc/init.d/gogs - update-rc.d gogs defaults 30 70 - service gogs start - systemctl daemon-reload + #cp $GOPATH/src/github.com/gogits/gogs/scripts/init/debian/gogs /etc/init.d/ + #sed -i 's/# Required-Start: $syslog $network/# Required-Start: $syslog $network $local_fs nginx/g' /etc/init.d/gogs + #sed -i 's/# Required-Stop: $syslog/# Required-Stop: $syslog $local_fs/g' /etc/init.d/gogs + #sed -i 's|WORKINGDIR=.*|WORKINGDIR=/home/git/go/src/github.com/gogits/gogs|g' /etc/init.d/gogs + #chown git:git /etc/init.d/gogs + #chmod ug+x /etc/init.d/gogs + #update-rc.d gogs defaults 30 70 + #service gogs start + #systemctl daemon-reload if [ ! -d /var/www/$GIT_DOMAIN_NAME ]; then mkdir /var/www/$GIT_DOMAIN_NAME