Skip to content

Conversation

@brewingcode
Copy link
Contributor

During a recent upgrade (https://dl.gogs.io/0.10.18/linux_amd64.tar.gz), my init.d script stopped working because the bundled script didn't have the execute bit set.

$ sudo service gogs start
gogs: unrecognized service
$ ls -l /etc/init.d/gogs
lrwxrwxrwx 1 root root 39 Oct 10 10:07 /etc/init.d/gogs -> /home/git/gogs/scripts/init/debian/gogs
$ ls -l /home/git/gogs/scripts/init/debian/gogs
-rw-r--r-- 1 git git 3112 Feb 21 09:44 /home/git/gogs/scripts/init/debian/gogs
$ sudo chmod +x /home/git/gogs/scripts/init/debian/gogs
$ sudo service gogs start
 * Starting Gogs gogs                                                                                                           [ OK ]

I suppose this might be better fixed in the packaging scripts in the main gogs repo, but I didn't feel comfortable editing that. Docs are just docs, right? 😁

I also condensed the three cp -R ... commands into a single command using brace expansion, which is a standard bash thing.

The scripts/init/debian/gogs file wasn't executable, which caused some
confusion when my init.d script stopped working (it symlinks to this
bundled script).

Might as well make sure all the shebang files are, in fact, executable.
@unknwon
Copy link
Member

unknwon commented Mar 24, 2017

Thank you!

@unknwon unknwon merged commit aafa03c into gogs:master Mar 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants