diff options
author | Dmitry Bogatov <KAction@debian.org> | 2018-12-12 02:24:26 +0000 |
---|---|---|
committer | Dmitry Bogatov <KAction@debian.org> | 2018-12-12 02:24:32 +0000 |
commit | 1432d897faea22299d253b3cfad8c94cd751ed1f (patch) | |
tree | 7fd27a5a65c86dd4c5942fa8c92c00f3e2862977 /runit-helper | |
parent | c870dcaa53988f709b1152221e76992972365fb5 (diff) |
Make auto-generated runscripts invoke svlogd(8) as `runit-log' user.
* Make auto-generated runscripts invoke svlogd(8) as `runit-log' user.
* Impose dependency on (runit >= 2.1.2-20), which provides `runit-log'
user.
Diffstat (limited to 'runit-helper')
-rwxr-xr-x | runit-helper | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/runit-helper b/runit-helper index 05724af..051cbfa 100755 --- a/runit-helper +++ b/runit-helper | |||
@@ -38,24 +38,11 @@ postrm () { | |||
38 | # Links in other runsvdirs is responsibility of administrator. | 38 | # Links in other runsvdirs is responsibility of administrator. |
39 | rm -f "/etc/runit/runsvdir/default/$NAME" | 39 | rm -f "/etc/runit/runsvdir/default/$NAME" |
40 | 40 | ||
41 | # Following code makes sure, that after removal of package, in default | ||
42 | # setup, the only files belonged to log user, belong to root. | ||
43 | # | ||
44 | # This way user can be safely removed, solving part of #848239 (need | ||
45 | # interoperation from dh-sysuser). | ||
46 | # | ||
47 | # Sure, system administrator can make stupid thing and chown some file | ||
48 | # to log user, but consequences do not seem to be so severe. After | ||
49 | # all, with great power comes great responsibility. | ||
50 | if [ -d "/var/log/runit/$NAME" ] ; then | ||
51 | chown --recursive root:root "/var/log/runit/$NAME" | ||
52 | fi | ||
53 | |||
54 | # If runscript was never invoked, there will be no files | 41 | # If runscript was never invoked, there will be no files |
55 | # in this directory, and `dpkg' will remove it. In this case, | 42 | # in this directory, and `dpkg' will remove it. In this case, |
56 | # we have nothing to do. | 43 | # we have nothing to do. |
57 | for supervise in "/var/lib/runit/supervise/$NAME" \ | 44 | for supervise in "/var/lib/runit/supervise/$NAME" \ |
58 | "/var/lib/runit/log/supervise/$NAME" ; do | 45 | "/var/lib/runit/log/supervise/$NAME" ; do |
59 | if [ -d "$supervise" ] ; then | 46 | if [ -d "$supervise" ] ; then |
60 | 47 | ||
61 | # Actually only `down' may be absent, but it does not | 48 | # Actually only `down' may be absent, but it does not |