summaryrefslogtreecommitdiff
path: root/puppet/modules/obfsproxy/files
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/obfsproxy/files')
-rwxr-xr-xpuppet/modules/obfsproxy/files/obfsproxy_init5
-rw-r--r--puppet/modules/obfsproxy/files/obfsproxy_logrotate14
2 files changed, 17 insertions, 2 deletions
diff --git a/puppet/modules/obfsproxy/files/obfsproxy_init b/puppet/modules/obfsproxy/files/obfsproxy_init
index 5223ec9d..7a7e7609 100755
--- a/puppet/modules/obfsproxy/files/obfsproxy_init
+++ b/puppet/modules/obfsproxy/files/obfsproxy_init
@@ -19,6 +19,7 @@ USER=obfsproxy
DATDIR=/etc/obfsproxy
PIDFILE=/var/run/obfsproxy.pid
CONF=$DATDIR/obfsproxy.conf
+LOGFILE=/var/log/obfsproxy/log
# If the daemon is not there, then exit.
test -x $DAEMON || exit 0
@@ -30,8 +31,8 @@ else
exit 2
fi
-DAEMONARGS=" --log-min-severity=$LOG --data-dir=$DATDIR $TRANSPORT \
- $PARAM --dest=$DEST_IP:$DEST_PORT server 0.0.0.0:$PORT"
+DAEMONARGS=" --log-min-severity=$LOG --log-file=$LOGFILE --data-dir=$DATDIR \
+ $TRANSPORT $PARAM --dest=$DEST_IP:$DEST_PORT server 0.0.0.0:$PORT"
start_obfsproxy() {
start-stop-daemon --start --quiet --oknodo -m --pidfile $PIDFILE \
diff --git a/puppet/modules/obfsproxy/files/obfsproxy_logrotate b/puppet/modules/obfsproxy/files/obfsproxy_logrotate
new file mode 100644
index 00000000..623bbab1
--- /dev/null
+++ b/puppet/modules/obfsproxy/files/obfsproxy_logrotate
@@ -0,0 +1,14 @@
+/var/log/obfsproxy/log {
+ weekly
+ missingok
+ rotate 10
+ compress
+ delaycompress
+ notifempty
+ create 600 obfsproxy obfsproxy
+ postrotate
+ if [ -f /var/run/obfsproxy.pid ]; then
+ /etc/init.d/obfsproxy restart > /dev/null
+ fi
+ endscript
+}