Skip to content

Commit

Permalink
Packages: log and pid paths made consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
defanator committed Jul 4, 2019
1 parent bcb9048 commit e1de5bc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/deb/debian/unit.default
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion pkg/deb/debian/unit.init
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/deb/debian/unit.service
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 2 additions & 2 deletions pkg/rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pkg/rpm/rpmbuild/SOURCES/unit.service
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e1de5bc

Please sign in to comment.