aboutsummaryrefslogtreecommitdiffstats
path: root/main/lxc/lxc.initd
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-01-01 23:39:57 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-01-01 23:43:10 +0200
commit19b0c63da322177b3942b5f1a790cd7d667d13e9 (patch)
tree18bf87805b5096c77b3ef9d671717b115bc8ba4b /main/lxc/lxc.initd
parent187ce4768d012babd4cc21ff75e25057af9e53e1 (diff)
downloadaports-19b0c63da322177b3942b5f1a790cd7d667d13e9.tar.bz2
aports-19b0c63da322177b3942b5f1a790cd7d667d13e9.tar.xz
main/lxc: set log directory permissions
Diffstat (limited to 'main/lxc/lxc.initd')
-rw-r--r--main/lxc/lxc.initd5
1 files changed, 4 insertions, 1 deletions
diff --git a/main/lxc/lxc.initd b/main/lxc/lxc.initd
index b2c99ec7ff..d5e45a5407 100644
--- a/main/lxc/lxc.initd
+++ b/main/lxc/lxc.initd
@@ -76,6 +76,9 @@ start() {
return 1
fi
+ local logdir=/var/log/lxc
+ checkpath -d -m 750 -o root:wheel $logdir
+
checkpath -d ${pidfile%/*}
ebegin "Starting container ${CONTAINER}"
start-stop-daemon --start $command \
@@ -86,7 +89,7 @@ start() {
--name ${CONTAINER} \
--rcfile ${CONFIGFILE} \
--logpriority WARN \
- --logfile /var/log/lxc/${CONTAINER}.log \
+ --logfile $logdir/${CONTAINER}.log \
|| eend $? || return $?
lxc-wait -n ${CONTAINER} -t 5 -s RUNNING
eend $?