diff --git a/.obsidian/plugins/breadcrumbs/data.json b/.obsidian/plugins/breadcrumbs/data.json index e9bbce0c..1be7c449 100644 --- a/.obsidian/plugins/breadcrumbs/data.json +++ b/.obsidian/plugins/breadcrumbs/data.json @@ -245,7 +245,7 @@ "prevs" ], "lock_view": false, - "lock_path": "formule conséquence d'un ensemble de formules.md", + "lock_path": "launchy-go.md", "custom_sort_fields": false, "custom_sort_field_labels": [] }, @@ -254,7 +254,7 @@ "show_attributes": [], "merge_fields": false, "lock_view": false, - "lock_path": "formule conséquence d'un ensemble de formules.md", + "lock_path": "launchy-go.md", "field_group_labels": [ "downs" ], diff --git a/lauchd.md b/lauchd.md new file mode 100644 index 00000000..01c627d4 --- /dev/null +++ b/lauchd.md @@ -0,0 +1,21 @@ +--- +up: + - "[[ligne de commande]]" + - "[[système d'exploitation]]" +tags: + - s/informatique +aliases: +--- + +Outil qui gère des daemons. + +```breadcrumbs +title: "Sous-notes" +type: tree +collapse: true +show-attributes: [field] +field-groups: [downs] +depth: [0, 0] +``` + + diff --git a/launchy-go.md b/launchy-go.md new file mode 100644 index 00000000..bfd10066 --- /dev/null +++ b/launchy-go.md @@ -0,0 +1,28 @@ +--- +up: + - "[[launchd]]" + - "[[terminal commandes]]" +tags: + - s/informatique +aliases: +--- +Wrapper autour de `lauchctl` pour configurer plus aisément [[launchd]]. +- gh https://github.com/sosedoff/lunchy-go +- source:: [[sosedofflunchy-go OSX Launch Manager]] + +# Installation +`brew install launchy-go` + +# Cheat sheet +`launchy ...` +- `ls` [pattern] +- `start` [pattern] +- `stop` [pattern] +- `restart` [pattern] +- `status`, `ps` [pattern] +- `install` [file] +- `show` [pattern] +- `edit` [pattern] +- `remove`, `rm` [pattern] +- `scan` [path] + diff --git a/sources/clippings/github/sosedofflunchy-go OSX Launch Manager.md b/sources/clippings/github/sosedofflunchy-go OSX Launch Manager.md new file mode 100644 index 00000000..7c941fe2 --- /dev/null +++ b/sources/clippings/github/sosedofflunchy-go OSX Launch Manager.md @@ -0,0 +1,161 @@ +--- +link: "https://github.com/sosedoff/lunchy-go" +created: 2026-06-05 +tags: + - "#t/clippings/github" +--- +## lunchy-go + +A friendly wrapper for launchctl. Start your agents and go to lunch! + +This is a port of original [lunchy](https://github.com/mperham/lunchy) ruby gem by Mike Perham with extra functionality. + +## Overview + +Don't you hate OSX's launchctl? You have to give it exact filenames. The syntax is annoying different from Linux's nice, simple init system and overly verbose. It's just not a very developer-friendly tool. + +Lunchy aims to be that friendly tool by wrapping launchctl and providing a few simple operations that you perform all the time: + +- ls \[pattern\] +- start \[pattern\] +- stop \[pattern\] +- restart \[pattern\] +- status, ps \[pattern\] +- install \[file\] +- show \[pattern\] +- edit \[pattern\] +- remove, rm \[pattern\] +- scan \[path\] + +where pattern is just a substring that matches the agent's plist filename. + +So instead of: + +``` +$ launchctl load ~/Library/LaunchAgents/io.redis.redis-server.plist +``` + +you can do this: + +``` +$ lunchy start redis +``` + +and: + +``` +$ lunchy ls + +com.danga.memcached +com.google.keystone.agent +com.mysql.mysqld +io.redis.redis-server +org.mongodb.mongod +``` + +## Install + +You can install binary by running the following bash command: + +``` +curl -s https://raw.githubusercontent.com/sosedoff/lunchy-go/master/install.sh | bash +``` + +#### Homebrew + +Install using [Homebrew](https://brew.sh/): + +``` +brew install lunchy-go +``` + +#### Binary Releases + +Precompiled binaries are available on Github: [https://github.com/sosedoff/lunchy-go/releases](https://github.com/sosedoff/lunchy-go/releases) + +#### Build from source + +Build source code with Go 1.2+: + +``` +git clone https://github.com/sosedoff/lunchy-go.git $GOPATH/src/lunchy +cd lunchy +go build +mv ./lunchy-go /usr/local/bin/lunchy +``` + +## Usage + +Add a new plist: + +``` +# Install plist +$ lunchy install /usr/local/Cellar/redis/2.8.1/homebrew.mxcl.redis.plist +``` + +Manage services: + +``` +$ lunchy start redis +$ lunchy stop redis +$ lunchy restart redis +$ lunchy status redis +``` + +If you have multiple plists from homebrew, you can simple control all of them: + +``` +$ lunchy status +homebrew.mxcl.elasticsearch +homebrew.mxcl.mysql +homebrew.mxcl.postgresql +homebrew.mxcl.redis + +# Will stop all processes prefixed by "homebrew" +$ lunchy stop homebrew +``` + +Manage plists: + +``` +$ lunchy show redis +$ lunchy edit redis +``` + +Scan directory for existing plists: + +``` +$ lunchy scan /usr/local/Cellar +``` + +Scan all homebrew plists: + +``` +$ lunchy scan homebrew +``` + +## Profiles + +When switching between different projects you might find yourself stopping and starting lots of different daemons in order to reduce memory usage. This is all good but there's a better way of doing it. Enter lunchy profiles. + +Profile file `.lunchy` should be placed under your project's root directory and include a list of services that needs to be started or stopped. Example: + +``` +postgres +redis +elasticsearch +``` + +Then you can simply run the following command to start/stop/restart ALL of them at once: + +``` +lunchy start +lunchy stop +lunchy restart +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2013-2015 Dan Sosedoff, [dan.sosedoff@gmail.com](mailto:dan.sosedoff@gmail.com) \ No newline at end of file