Giter VIP home page Giter VIP logo

daemons.el's People

Contributors

bricewge avatar camdez avatar cbowdon avatar dmitescu avatar jellelicht avatar laurencewarne avatar mallt avatar olivia5k avatar purcell avatar yyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

daemons.el's Issues

Support arbitrary actions for shepherd services

shepherd allows one to define arbitrary actions for each services taking any number of arguments.

As an example, the root service support, by default, several actions in addition to the more common ones (ie: start, disable, status, ...) that are specific of this service. Like power-off to shutdown your system that takes no other arguments or eval that takes some Guile code as an argument to be executed by shepherd. To get the list of the actions a service support we can use the doc action with the list-actions. Following is a little example of such usage:

$ herd doc root
The root service is used to operate on shepherd itself
$ herd doc root list-actions
root (help status halt power-off load eval unload reload daemonize persistency no-persistency cd restart)
$ herd eval root '(* 2 21)'
Évaluation de l'expression utilisateur (* 2 21).
42
$ sudo herd power-off root
# The system shutdown.

I couldn't find any supported system daemons which accept arbitrary actions. How should I went about implement such a feature for shepherd in daemons.el?

Wrong number of arguments: (1 . 1), 0

Hi Thanks for the package, first time user, i am on debian (systemd), just installed the package and called M-x daemons I get the error above

Backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1) 0)
  shell-command-to-string()
  apply(shell-command-to-string nil)
  daemons--shell-command-to-string()
  daemons-systemd--list()
  funcall(daemons-systemd--list)
  daemons--list()
  tabulated-list-print(t t)
  (save-current-buffer (set-buffer list-buffer) (display-buffer-pop-up-window list-buffer nil) (switch-to-buffer-other-window list-buffer) (if daemons-always-sudo (progn (daemons--sudo))) (daemons--require-init-system-submodule) (daemons-mode) (daemons-mode-refresh) (tabulated-list-print t t))
  (let ((list-buffer (get-buffer-create daemons--list-buffer-name))) (save-current-buffer (set-buffer list-buffer) (display-buffer-pop-up-window list-buffer nil) (switch-to-buffer-other-window list-buffer) (if daemons-always-sudo (progn (daemons--sudo))) (daemons--require-init-system-submodule) (daemons-mode) (daemons-mode-refresh) (tabulated-list-print t t)))
  daemons()
  funcall-interactively(daemons)
  #<subr call-interactively>(daemons record nil)
  apply(#<subr call-interactively> daemons (record nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> daemons record nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (daemons record nil))
  call-interactively(daemons record nil)
  command-execute(daemons record)
  execute-extended-command(nil "daemons")

Brew: warnings in `brew services list` break parsing

Under some circumstances, brew services list's output may contain "Warning" lines which break this package's ability to parse the output.

For example, my current output of the command is:

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the lucagrulla/tap tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/lucagrulla/homebrew-tap/Formula/cw.rb:9

Warning: Calling bottle :unneeded is deprecated! There is no replacement.
Please report this issue to the polyfy/polylith tap (not Homebrew/brew or Homebrew/core):
  /usr/local/Homebrew/Library/Taps/polyfy/homebrew-polylith/Formula/poly.rb:8

Name        Status  User   File
offlineimap started camdez ~/Library/LaunchAgents/homebrew.mxcl.offlineimap.plist
redis       stopped        
syncthing   started camdez ~/Library/LaunchAgents/homebrew.mxcl.syncthing.plist
unbound     stopped        

(FWIW, these lines are printed to STDERR, but still are included in the text returned by daemons--shell-command-to-string.)

PR to follow promptly.

Feature requests: enable/disable services and others

I only use debian based machines as of now, so i have systemd installed, the following features requests may only pertain to systemd.

  • key-commands for enable/disable services.

  • Sorting the services by status (enabled/disabled/masked etc..)

  • Caching root password for some time (some packages (I dont remember which, tramp may be?) don't ask for password each time) , or even better an option to start the daemons as super user (Ideally with warning banner on top saying "running daemons as root, be careful" or something)

If I need any other I will add here.

Thank you.

Any plans to make this work on remote systems?

One of the great things about tramp mode is that if I'm remote editing a file and open a shell it opens on the remote host. What would it take for daemons.el to support something like that?

Thanks!

Systemd user services

Hi, cool package, thank you!

I just noticed that my emacs-daemon service which is running as systemd --user server isn't listed. Is that expected?

Privilege elevation is not done early enough

With a systemwide installation on GuixSD of the GNU Shepherd,
invocations of any command need to be prefixed with sudo.

While daemons-always-sudo solves this problem partially, it is not invoked early enough.

The initial list is not populated, only when I call daemons again from the unpopulated daemons-buffer it works. Both times, my sudo password is required.

The workaround that I now have in my config:

  (defadvice daemons (before make-sure-sudo)
    "Make sure we actually call sudo before we start doing occult
    stuff."
    (when daemons-always-sudo
      (daemons--sudo)))
  (ad-activate 'daemons)

Quiet/message-based start/stop of services

There are not a lot of situations where I'm actually interested in the buffer that pops up after running daemons-{stop,start}. Is there some way where I can make the buffer with e.g. "Service vpn has been stopped." instead be a message in the echo area?

Handle templated systemd services

Currently, services-mode displays the template but not instantiated templated services. For example, it lists getty@ but not getty@tty1.

Also, hitting RET on a template doesn't do anything useful (it opens a buffer that displays "Failed to get properties: Unit name [email protected] is neither a valid invocation ID nor unit name.").

I don't have any strong opinons on how these services should be handled, but they should be handled somehow (e.g., being able to stop [email protected] would be nice).


(Also, awesome project! I've been looking for something like this for a while. I currently have a set of ivy commands but this is much nicer).

MELPA?

Sorry, not an issue per se, more of a question: any chance you're going to put this on MELPA?

This is a package I'd definitely use. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.