From: Alexei Takaseev <alexei@taf.ru> To: ALT Linux Team development discussions <devel@lists.altlinux.org> Subject: [devel] systemd + logrotate + syslogd Date: Sat, 17 Nov 2012 13:28:29 +0900 (IRKT) Message-ID: <19020562.58.1353126507447.JavaMail.javamailuser@localhost> (raw) In-Reply-To: <23833340.57.1353126466950.JavaMail.javamailuser@localhost> Добрый день! Подскажите, вот такой костыль: --- reload-syslog.old 2009-02-12 10:17:02.000000000 +0800 +++ reload-syslog 2012-11-16 20:19:56.000000000 +0900 @@ -2,9 +2,17 @@ LOCKDIR=/var/lock/subsys -for n in syslogd syslog-ng rsyslogd; do +if ! cat /proc/1/cmdline | fgrep --binary-files=text \/bin\/systemd; then + for n in syslogd syslog-ng rsyslogd; do if [ -f "$LOCKDIR/$n" ]; then /sbin/service $n reload && break fi -done + done +else + for n in syslogd syslog-ng rsyslogd; do + if [ -f "$LOCKDIR/$n" ]; then + /bin/systemctl restart ${n}.service && break + fi + done +fi exit 0 будет сильно противоречить политике партии, или не очень? Дома перевел машину под systemd, и ежедневное умирание syslog при ротации логов малость поднадоело.
next parent reply other threads:[~2012-11-17 4:28 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-11-17 4:28 ` Alexei Takaseev [this message] 2012-11-17 10:37 ` Dmitry V. Levin 2012-11-20 8:33 ` Mike 2012-11-20 9:23 ` Dmitry V. Levin 2012-11-17 10:55 ` Michael Shigorin 2012-11-19 6:01 ` Sergei Epiphanov 2012-11-19 11:04 ` Dmitry V. Levin 2012-11-19 11:13 ` Alexei Takaseev 2012-11-19 11:35 ` Sergei Epiphanov 2012-11-20 8:30 ` Mike 2012-11-20 9:40 ` Sergei Epiphanov
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=19020562.58.1353126507447.JavaMail.javamailuser@localhost \ --to=alexei@taf.ru \ --cc=devel@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 Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/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 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git