Integrate a launchd config #1

Open
opened 2016-11-28 08:26:46 +00:00 by tboerger · 16 comments
tboerger commented 2016-11-28 08:26:46 +00:00 (Migrated from github.com)

Since we are packaging a daemon we should also provide a script to start this service on system start.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Since we are packaging a daemon we should also provide a script to start this service on system start. <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39575640-integrate-a-launchd-config?utm_campaign=plugin&utm_content=tracker%2F49155492&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F49155492&utm_medium=issues&utm_source=github). </bountysource-plugin>

In fact, I don't like daemon in Mac. I like mysql.server start|stop script. So maybe we can gitea.web start|stop|restart?

In fact, I don't like daemon in Mac. I like `mysql.server start|stop` script. So maybe we can `gitea.web start|stop|restart`?
tboerger commented 2016-11-28 10:26:49 +00:00 (Migrated from github.com)

We can also provide a wrapper script that can do that but I think the majority prefers the launchd script :)

We can also provide a wrapper script that can do that but I think the majority prefers the launchd script :)
bySabi commented 2017-12-01 07:58:46 +00:00 (Migrated from github.com)

launchd script should be on wiki. I have one that is working fine.
I glad to contrib to this project

launchd script should be on wiki. I have one that is working fine. I glad to contrib to this project

@bySabi please do it.

@bySabi please do it.
bySabi commented 2017-12-01 11:21:50 +00:00 (Migrated from github.com)

@lunny I don't know for sure, will be my first wiki on github, but probably the Wiki need to be enable on this repo and I will need write contrib rights.

@lunny I don't know for sure, will be my first wiki on github, but probably the Wiki need to be enable on this repo and I will need write contrib rights.
lafriks commented 2017-12-01 12:22:19 +00:00 (Migrated from github.com)

@bySabi submit change as PR to README.md, it think this would be ok place for this

@bySabi submit change as PR to `README.md`, it think this would be ok place for this
tboerger commented 2017-12-01 12:45:05 +00:00 (Migrated from github.com)

A launchd service definition should be integrated in to the formula, like https://github.com/kleister/homebrew-kleister/blob/master/kleister-api.rb#L64-L89

A launchd service definition should be integrated in to the formula, like https://github.com/kleister/homebrew-kleister/blob/master/kleister-api.rb#L64-L89
bySabi commented 2017-12-01 13:06:39 +00:00 (Migrated from github.com)

I'm with @tboerger, a launchd plist creation must be integrated in to the formula with proper advice for launchctl load/unload PATH's for user intervention. This tips must be on wiki too, many users don't read brew installs output.

I also want to put a few general tips more appropriate for a wiki.

I'm with @tboerger, a launchd plist creation must be integrated in to the formula with proper advice for launchctl load/unload PATH's for user intervention. This tips must be on wiki too, many users don't read brew installs output. I also want to put a few general tips more appropriate for a wiki.
tboerger commented 2017-12-01 13:25:41 +00:00 (Migrated from github.com)

I would prefer basic instructions within the readme, otherwise something on the docs instead of a wiki within this repo.

Edit: You can find the docs source at https://github.com/go-gitea/gitea/tree/master/docs

I would prefer basic instructions within the readme, otherwise something on the docs instead of a wiki within this repo. Edit: You can find the docs source at https://github.com/go-gitea/gitea/tree/master/docs
bySabi commented 2017-12-01 13:34:01 +00:00 (Migrated from github.com)

@tboerger the tips that I'm talk are too brew/OSX related and probably fit better on a wiki.

@tboerger the tips that I'm talk are too `brew/OSX` related and probably fit better on a wiki.
tboerger commented 2017-12-01 13:38:23 +00:00 (Migrated from github.com)

@tboerger the tips that I'm talk are too brew/OSX related and probably fit better on a wiki.

We got all documentation related to Gitea bundled on our documentation, so we can add another page dedicated to the macOS setup of Gitea.

> @tboerger the tips that I'm talk are too brew/OSX related and probably fit better on a wiki. We got all documentation related to Gitea bundled on our documentation, so we can add another page dedicated to the macOS setup of Gitea.
bySabi commented 2017-12-01 13:43:50 +00:00 (Migrated from github.com)

Ah, great!!

I will take a look at doc and see how can it fit better

Ah, great!! I will take a look at doc and see how can it fit better

Is this info on using launchd located somewhere else now, given this issue is 1 year old? It's not in the Wiki or README.

Is this info on using `launchd` located somewhere else now, given this issue is 1 year old? It's not in the Wiki or README.

We haven't implement this yet.

We haven't implement this yet.
Owner

@uhren i have no OSX but if you find the mentiont script+update or write a own one ... and make a PR we can look at

@uhren i have no OSX but if you find the mentiont script+update or write a own one ... and make a PR we can look at

Start gitea:

echo '<?xml version="1.0" encoding="UTF-8"?>
<plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>gitea</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/bin/gitea</string>
      <string>web</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/usr/local/var/log/gitea.log</string>
    <key>StandardOutPath</key>
    <string>/usr/local/var/log/gitea.log</string>
  </dict>
</plist>' >$HOME/Library/LaunchAgents/gitea.plist

launchctl load -w $HOME/Library/LaunchAgents/gitea.plist
launchctl start gitea

Stop gitea
launchctl bootout gui/501/gitea
501 is your uid

Restart

launchctl load $HOME/Library/LaunchAgents/gitea.plist
Start gitea: ```bash echo '<?xml version="1.0" encoding="UTF-8"?> <plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>KeepAlive</key> <true/> <key>Label</key> <string>gitea</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/gitea</string> <string>web</string> </array> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/usr/local/var/log/gitea.log</string> <key>StandardOutPath</key> <string>/usr/local/var/log/gitea.log</string> </dict> </plist>' >$HOME/Library/LaunchAgents/gitea.plist launchctl load -w $HOME/Library/LaunchAgents/gitea.plist launchctl start gitea ``` Stop gitea `launchctl bootout gui/501/gitea` 501 is your uid Restart ```bash launchctl load $HOME/Library/LaunchAgents/gitea.plist ```
Sign in to join this conversation.
No description provided.