ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Sergey Vlasov <vsu@altlinux.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] systemd: параметры сервису
Date: Sun, 27 Jan 2013 17:08:56 +0400
Message-ID: <20130127130856.GC6732@atlas.home> (raw)
In-Reply-To: <1359270079.3242.7.camel@v3405.naf.net.ru>

[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]

On Sun, Jan 27, 2013 at 11:01:19AM +0400, Nikolay A. Fetisov wrote:
> В Сб, 26/01/2013 в 21:36 +0400, Michael A. Kangin пишет:
> > А как с systemd можно передавать параметры нужному сервису?
> > 
> > например, сказать service openvpn start mywork?
> > 
> 
> Есть у меня смутная уверенность, что никак.
> Мало того, и нестандартные действия вида 'service httpd2 extendedstatus'
> тоже под systemd не живут.
> 
> Если руками и запускать скрипт из init.d - то обёртка service для 
> этого не подходит, требуется запуск непосредственно скрипта в 
> /etc/rc.d/init.d/ , т.е. "/etc/rc.d/init.d/openvpn start mywork" .
> Если нужна автоматика - то, по-видимому, требуется написание своего
> /etc/systemd/system/openvpn-mywork.service , под каждый из каналов.

Случай с openvpn скорее похож на вариант "Instantiated Services":

  http://0pointer.de/blog/projects/instances.html

Получается что-то типа

  systemctl start openvpn@mywork.service

Здесь mywork - это идентификатор экземпляра сервиса, который в файле
openvpn.service будет доступен как %i (либо %I с дополнительным
экранированием спецсимволов) и может быть использован, например, для
поиска нужного файла конфигурации.

Нестандартные действия вида 'service httpd2 extendedstatus'
действительно не вписываются в логику systemd - возможно, их придётся
реализовывать отдельным ни на что не похожим скриптом для каждой
ситуации.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      reply	other threads:[~2013-01-27 13:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 17:36 Michael A. Kangin
2013-01-27  7:01 ` Nikolay A. Fetisov
2013-01-27 13:08   ` Sergey Vlasov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130127130856.GC6732@atlas.home \
    --to=vsu@altlinux.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git