Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the content of a file into the SMF exec_method #418

Closed
benjamin-bergia opened this issue Oct 17, 2016 · 2 comments
Closed

Get the content of a file into the SMF exec_method #418

benjamin-bergia opened this issue Oct 17, 2016 · 2 comments

Comments

@benjamin-bergia
Copy link

I am trying to get the graceful restart to work in my haproxy manifest. My current methods are:
<exec_method name='start' type='method' exec='/opt/local/sbin/haproxy -f /opt/local/etc/haproxy.cfg -D -p /var/run/haproxy.pid' timeout_seconds='60'/>

<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>

<exec_method name='refresh' type='method' exec='/opt/local/sbin/haproxy -f /opt/local/etc/haproxy.cfg -sf $(/usr/bin/cat /var/run/haproxy.pid)' timeout_seconds='60'/>

I know that the environment used by exec is very limited and the $(/usr/bin/cat ... part doesn't seem to work properly. Is there any way to get the content from /var/run/haproxy.pid as an argument ?

@mamash
Copy link

mamash commented Oct 17, 2016

No, you'd have to write a script for that and use it instead.

@benjamin-bergia
Copy link
Author

Ok, thank you

jperkin pushed a commit that referenced this issue Feb 1, 2017
Release 0.3.0 of Streamlink!

A lot of updates to each plugin (thank you @beardypig !), automated Windows releases, PEP8 formatting throughout Streamlink are some of the few updates to this release as we near a stable 1.0.0 release.

Main features are:

    Lot's of maintaining / updates to plugins
    General bug and doc fixes
    Major improvements to development (github issue templates, automatically created releases)

Agustín Carrasco <asermax@gmail.com> (1):
      Links on crunchy's rss no longer contain the show name in the url (#379)

Brainzyy <Brainzyy@users.noreply.github.com> (1):
      Add basic tests for stream.me plugin (#391)

Javier Cantero <jcantero@escomposlinux.org> (2):
      plugins/twitch: use version v3 of the API
      plugins/twitch: use kraken URL

John Smith <v2.0@protonmail.com> (3):
      Added support for bongacams.com streams (#329)
      streamlink_cli.main: close stream_fd on exit (#427)
      streamlink_cli.utils.progress: write new line at finish (#442)

Max Riegler <rinukkusu@sub-r.de> (1):
      plugins.chaturbate: new regex (#457)

Michiel Sikma <michiel@wedemandhtml.com> (1):
      Update PLAYER_VERSION, as old one does not return data. Add ability to use streams with /embed/video in the URL, from embedded players. (#311)

Mohamed El Morabity <melmorabity@users.noreply.github.com> (6):
      Add support for pluzz.francetv.fr (#343)
      Fix ArteTV plugin (#385)
      Add support for Canal+ TV group channels (#416)
      Update installation instructions for Fedora (#443)
      Add support for Play TV (#439)
      Use token generator for HLS streams, as for HDS ones (#466)

RosadinTV <rosadintv@outlook.com> (1):
      --can-handle-url-no-redirect parameter added (#333)

Stefan Hanreich <stefanhani@gmail.com> (1):
      added chocolatey to the documentation (#380)

bastimeyer <mail@bastimeyer.de> (3):
      Automatically create Github releases
      Set changelog in automated github releases
      Add a github issue template

beardypig <beardypig@users.noreply.github.com> (55):
      plugins.tvcatchup: site layout changed, updated the stream regex to accommodate the change (#338)
      plugins.streamlive: streamlive.to have added some extra protection to their streams which currently prevents us from capturing them (#339)
      cli: add command line option to specific logging path for subprocess errorlog
      plugins.trtspor: added support for trtspor.com (#349)
      plugins.kanal7: fixed page change in kanal7 live stream (#348)
      plugins.picarto: Remove the unreliable rtmp stream (#353)
      packaging: removed the built in backports infavour of including them as dependencies when required (#355)
      Boost the test coverage a bit (#362)
      plugins: all regex string should be raw (#361)
      ci: build and test on Python 3.6 (+3.7 on travis, with allowed failure) (#360)
      packages.flashmedia: fix bug in AMFMessage (#359)
      tests: use mock from unittest when available otherwise fallback to mock (#358)
      stream.hls: try to retry stream segments (#357)
      tests: add codecov config file (#363)
      plugins.picarto: updated plugin to use tech_switch divs to find the stream parameters
      plugins.mitele: support for live streams on mitele.es
      docs: add a note about python-devel needing to be installed in some cases
      docs/release: generate the changelog as rst instead of md
      plugins.adultswim: support https urls
      use iso 8601 date format for the changelog
      plugins.tf1: added plugin to support tf1.fr and lci.fr
      plugins.raiplay: added plugin to support raiplay.it
      plugins.vaughnlive: updated player version and info URL (#383)
      plugins.tv8cat: added support for tv8.cat live stream (#390)
      Fix TF1.fr plugin (#389)
      plugins.stream: fix a default scheme handling for urls
      Add support for some Bulgarian live streams (#392)
      rtmp: fix bug in redirect for rtmp streams
      plugins.sportal: added support for the live stream on sportal.bg
      plugins.bnt: update the user agent string for the http requests
      plugins.ssh101: update to support new site layout
      Optionally use FFMPEG to mux separate video and audio streams (#224)
      Support for 4K videos in YouTube (#225)
      windows-installer: add the version info to the installer file
      include CHANGELOG.rst instead of .md in the egg
      stream.hls: output duplicate streams for HLS when multiple streams of the same quality are available
      stream.ffmpegmux: fix support for avconv, avconv will be used if ffmpeg is not found
      Adultswin VOD support (#406)
      Move streamlink_cli.utils.named_pipe in to streamlink.utils
      plugins.rtve: update plugin to support new streaming method
      stream.hds: omit HDS streams that are protected by DRM
      Adultswin VOD fix for live show replays (#418)
      plugins.rtve: add support for legacy stream URLs
      installer: remove the streamlink bin dir from %PATH% before installing
      plugins.twitch: only check hosted channels when playing a live stream
      docs: tweaks to docs and docs build process
      Fix iframe detection for BTN/cdn.bg streams (#437)
      fix some regex that give deprecation warnings in python 3.6
      plugins.adultswim: correct behaviour for archived streams
      plugins.nineanime: add scheme to grabber api url if not present
      session: add an option to disable Diffie Hellman key exchange
      plugins.srgssr: added support for srg ssr sites: srf, rts and rsi
      plugins.srgssr: fixed bug in api URL and fixed akamai urls with authparams
      cli: try to terminate the player process before killing it (if terminate takes too long)
      plugins.swisstxt: add support for the SRG SSR sites sports sections

fozzy <fozzysec@gmail.com> (1):
      Add plugin for huajiao.com and zhanqi.tv (#334)

sqrt2 <sqrt2@users.noreply.github.com> (1):
      Fix swf_url in livestream.com plugin (#428)

stepshal <nessento@openmailbox.org> (1):
      Remove trailing.

stepshal <stepshal@users.noreply.github.com> (2):
      Add blank line after class or function definition (#408)
      PEP8 (#414)
jperkin pushed a commit that referenced this issue Jun 13, 2017
=== 4.1.0
=== 4.1.0.rc1

 * ProxyJump support [Ryan McGeary, #500]
 * Fix agent detection on Windows [Christian Koehler, #495]

=== 4.1.0.beta1

 * Fix nil error when libsodium is not there [chapmajs ,#488]
 * SSH certificate support for client auth [David Bartley, #485]

=== 4.0.1
=== 4.0.1.rc2

 * ENV["HOME"] might be empty so filter non expandable paths [Matt Casper, #351]

=== 4.0.1.rc1

 * support of rbnacl 4.0 and better error message [#479]
 * support include in config files [Kimura Masayuki, #475]
 * fixed issue with ruby 2.2 or older on windows [#472]

=== 4.0.0
=== 4.0.0.rc3

 * parse `+` character in config files [Christoph Lupprich, #470, #314]

=== 4.0.0.rc2

 * Fixed OpenSSL 2.0/Ruby 2.4.0 warnings [Miklós Fazekas, #468]
 * Added ssh-ed25519 to KnownHosts:SUPPORTED_TYPE [detatka-kuzlatka-otevrete, Miklós Fazekas, #459]
 * Allow nil for :passhrase and passing in nil option is now a depreaction warning [Miklós Fazekas, #465]

=== 4.0.0.rc1

 * Allow :password to be nil for capistrano v2 compatibility [Will Bryant, #357]
 * In next_packet if prefer consuming buffer before filling it again if we have enough data [Miklós Fazekas, #454]

=== 4.0.0.beta4

 * Added exitstatus method to exec's return [Miklós Fazekas, #452]
 * Don't raise from exec if server closes transport just after channel close [Miklós Fazekas, #450]
 * Removed java_pageant, as jruby should be using regular pagent impl [Miklós Fazekas, ]
 * Use SSH_AUTH_SOCK if possible on windows (cygwin) [Miklós Fazekas, Martin Dürst, #365, #361]
 * HTTPS proxy support [Marcus Ilgner, #432]
 * Supports ruby 2.4.0.dev new exception type from OpenSSL::PKey.read

=== 4.0.0.beta3

 * Fix Net::SSH::Disconnect exceptions when channels are closed cleanly [Miklos Fazekas, #421, #422]

=== 4.0.0.beta2

 * Fix raiseUnlessLoaded undefined ERROR issue [Miklos Fazekas, #418]

=== 4.0.0.beta1

* Fix pageant [elconas, #235]
* Relaxed rbnacl,rbnacl-selenium contstraints ang give better errors about them [Miklos Fazekas, #398]
* Fix UTF-8 encoding issues [Ethan J. Brown, #407]

=== 4.0.0.alpha4

* Experimental event loop abstraction [Miklos Fazekas]
* RbNacl dependency is optional [Miklos Fazekas]
* agent_socket_factory option [Alon Goldboim]
* client sends KEXINIT, it doesn't have to wait for server [Miklos Fazekas]
* better error message when option is nil [Kane Morgan]
* prompting can be customized [Miklos Fazekas]

=== 4.0.0.alpha3

* added max_select_wait_time [Eugene Kenny]

=== 4.0.0.alpha2

* when transport closes we're cleaning up channels [Miklos Fazekas]

=== 4.0.0.alpha1

* ed25519 key support [Miklos Fazekas]
* removed camellia [Miklos Fazekas]

=== 3.1.0
=== 3.1.0.rc1

* fix Secure#verify [Jean Boussier]
* use the smallest of don't spend longer time than keepalive if it's configured [Eugene Kenny]

=== 3.1.0.beta3

* forward/on_open_failed should stop listning closed socket otherwise it locks #269 [Miklos Fazekas,Scott McGillivray]
* fix incorrect pattern handling in config files #310 [Miklos Fazekas]

=== 3.1.0.beta2

* trying to execute something on a not yet opend channel throws nicer messag [Miklos Fazekas]
* calling close on a not opened channel marks the channel for close [Miklos Fazekas]
* read keepalive configuration from ssh config files [Miklos Fazekas]
* send client version on hadshake before waiting for server to reduce handshake time [Miklos Fazekas]
* allow custom Net::SSH::KnownHosts implementations [Jean Boussier]
* memoize known host so we only search it once per session [Jean Boussier, Miklos Fazekas]

=== 3.0.2
=== 3.0.2.rc1

* fixed rare WaitWritable error with proxy commands [Miklos Fazkas, Andre Meij]]
* if Net::SSH.start user is nil and config has no entry we default to Etc.getlogin
* Bugfix: CHANNEL_CLOSE was sent before draining ouput buffer #280 [Christopher F. Auston]

=== 3.0.1
=== 3.0.1.rc1

* Breaking change from 2.* series: exec! without block now returns empty string instread of nil if command has no output [net-ssh/net-ssh#273]
* Support remote_user as %r in proxy commands [Dominic Scheirlinck]
* Raise Net::SSH::ConnectionTimeout from connection timeout [Carl Hoerberg]

=== 3.0.0.rc1

* SemVer: Major version change because of dropping of ruby 1.9
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

No branches or pull requests

2 participants