systemd commands

This commit is contained in:
Bob Mottram 2015-03-18 22:02:10 +00:00
parent 6a7979e515
commit a3ba66a353
1 changed files with 7 additions and 13 deletions

View File

@ -6714,19 +6714,13 @@ quit" > $INSTALL_DIR/batch.sql
shred -zu $INSTALL_DIR/batch.sql shred -zu $INSTALL_DIR/batch.sql
chown -R git:git /home/git chown -R git:git /home/git
cp $GOPATH/src/github.com/gogits/gogs/scripts/systemd/gogs.service /etc/systemd/ cp $GOPATH/src/github.com/gogits/gogs/scripts/systemd/gogs.service /etc/systemd/system
sed -i 's|#After=mysqld.service|After=mysqld.service|g' /etc/systemd/gogs.service sed -i 's|#After=mysqld.service|After=mysqld.service|g' /etc/systemd/system/gogs.service
systemd restart gogs sed -i "s|WorkingDirectory=.*|WorkingDirectory=$GOPATH/src/github.com/gogits/gogs|g" /etc/systemd/system/gogs.service
sed -i "s|ExecStart=.*|ExecStart=$GOPATH/src/github.com/gogits/gogs/gogs web|g" /etc/systemd/system/gogs.service
#cp $GOPATH/src/github.com/gogits/gogs/scripts/init/debian/gogs /etc/init.d/ systemctl enable gogs
#sed -i 's/# Required-Start: $syslog $network/# Required-Start: $syslog $network $local_fs nginx/g' /etc/init.d/gogs systemctl daemon-reload
#sed -i 's/# Required-Stop: $syslog/# Required-Stop: $syslog $local_fs/g' /etc/init.d/gogs systemctl restart 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 if [ ! -d /var/www/$GIT_DOMAIN_NAME ]; then
mkdir /var/www/$GIT_DOMAIN_NAME mkdir /var/www/$GIT_DOMAIN_NAME