summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-07-04 14:14:29 +0300
committerAndrei Belov <defan@nginx.com>2019-07-04 14:14:29 +0300
commite1de5bcfabf468b88b42aa27c60a643e97aacc11 (patch)
tree497d9dc3d05f6ac8ee6fbbbc094b13e357f8e8f2
parentbcb9048c4663a34d9b29a6b5b8e3da14a4321a96 (diff)
downloadunit-e1de5bcfabf468b88b42aa27c60a643e97aacc11.tar.gz
unit-e1de5bcfabf468b88b42aa27c60a643e97aacc11.tar.bz2
Packages: log and pid paths made consistent.
-rw-r--r--pkg/deb/debian/unit.default2
-rw-r--r--pkg/deb/debian/unit.init2
-rw-r--r--pkg/deb/debian/unit.service2
-rw-r--r--pkg/rpm/Makefile4
-rw-r--r--pkg/rpm/rpmbuild/SOURCES/unit.service4
5 files changed, 7 insertions, 7 deletions
diff --git a/pkg/deb/debian/unit.default b/pkg/deb/debian/unit.default
index b0f0f72d..8aff8bfe 100644
--- a/pkg/deb/debian/unit.default
+++ b/pkg/deb/debian/unit.default
@@ -1 +1 @@
-DAEMON_ARGS="--log /var/log/unit.log --pid /run/unit.pid"
+DAEMON_ARGS="--log /var/log/unit.log --pid /var/run/unit.pid"
diff --git a/pkg/deb/debian/unit.init b/pkg/deb/debian/unit.init
index c991b912..2f573f99 100644
--- a/pkg/deb/debian/unit.init
+++ b/pkg/deb/debian/unit.init
@@ -31,7 +31,7 @@ umask 022
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
- if start-stop-daemon --start --quiet --pidfile /run/$NAME.pid \
+ if start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_ARGS; then
log_end_msg 0
else
diff --git a/pkg/deb/debian/unit.service b/pkg/deb/debian/unit.service
index 445851a5..d07a06d3 100644
--- a/pkg/deb/debian/unit.service
+++ b/pkg/deb/debian/unit.service
@@ -5,7 +5,7 @@ After=network-online.target
[Service]
Type=forking
-PIDFile=/run/unit.pid
+PIDFile=/var/run/unit.pid
EnvironmentFile=-/etc/default/unit
ExecStart=/usr/sbin/unitd $DAEMON_ARGS
ExecReload=
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 9e343aa2..4e970e45 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -140,8 +140,8 @@ CONFIGURE_ARGS=\
--prefix=/usr \
--state=%{_sharedstatedir}/unit \
--control="unix:/var/run/unit/control.sock" \
- --pid=/var/run/unit.pid \
- --log=/var/log/unit.log \
+ --pid=/var/run/unit/unit.pid \
+ --log=/var/log/unit/unit.log \
--tests \
--openssl
diff --git a/pkg/rpm/rpmbuild/SOURCES/unit.service b/pkg/rpm/rpmbuild/SOURCES/unit.service
index f888685f..6df00fbb 100644
--- a/pkg/rpm/rpmbuild/SOURCES/unit.service
+++ b/pkg/rpm/rpmbuild/SOURCES/unit.service
@@ -7,7 +7,7 @@
# the following:
# [Service]
-# Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /run/unit/unit.pid"
+# Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /var/run/unit/unit.pid"
[Unit]
Description=NGINX Unit
@@ -16,7 +16,7 @@ After=network-online.target
[Service]
Type=simple
-Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /run/unit/unit.pid"
+Environment="UNITD_OPTIONS=--log /var/log/unit/unit.log --pid /var/run/unit/unit.pid"
ExecStart=/usr/sbin/unitd $UNITD_OPTIONS --no-daemon
ExecReload=
RuntimeDirectory=unit