Repository: ranger
Updated Branches:
  refs/heads/master 6f51d062a -> 42e050157


RANGER-1568:Similar to RANGER-1540, the Ranger UserSync should also support the 
same new feature.

Signed-off-by: zhangqiang2 <zhangqia...@zte.com.cn>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/42e05015
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/42e05015
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/42e05015

Branch: refs/heads/master
Commit: 42e050157b55a9a5bef1f2d913e8c5f0351364ab
Parents: 6f51d06
Author: peng.jianhua <peng.jian...@zte.com.cn>
Authored: Tue May 9 22:51:31 2017 -0400
Committer: zhangqiang2 <zhangqia...@zte.com.cn>
Committed: Thu May 11 05:21:15 2017 -0400

----------------------------------------------------------------------
 unixauthservice/conf.dist/log4j.properties          | 2 +-
 unixauthservice/scripts/ranger-usersync-services.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/42e05015/unixauthservice/conf.dist/log4j.properties
----------------------------------------------------------------------
diff --git a/unixauthservice/conf.dist/log4j.properties 
b/unixauthservice/conf.dist/log4j.properties
index dbad541..b022b51 100644
--- a/unixauthservice/conf.dist/log4j.properties
+++ b/unixauthservice/conf.dist/log4j.properties
@@ -21,7 +21,7 @@ log4j.rootLogger = info,logFile
 
 # logFile
 log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender
-log4j.appender.logFile.file=${logdir}/usersync.log
+log4j.appender.logFile.file=${logdir}/usersync-${hostname}-${user}.log
 log4j.appender.logFile.datePattern='.'yyyy-MM-dd
 log4j.appender.logFile.layout=org.apache.log4j.PatternLayout
 log4j.appender.logFile.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} %5p 
%c{1} [%t] - %m%n

http://git-wip-us.apache.org/repos/asf/ranger/blob/42e05015/unixauthservice/scripts/ranger-usersync-services.sh
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/ranger-usersync-services.sh 
b/unixauthservice/scripts/ranger-usersync-services.sh
index ade10ea..97f5708 100644
--- a/unixauthservice/scripts/ranger-usersync-services.sh
+++ b/unixauthservice/scripts/ranger-usersync-services.sh
@@ -76,7 +76,7 @@ if [ "${action}" == "START" ]; then
         fi
     fi
        SLEEP_TIME_AFTER_START=5
-       nohup java -Dproc_rangerusersync 
-Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties 
${JAVA_OPTS} -Dlogdir="${logdir}" -cp "${cp}" 
org.apache.ranger.authentication.UnixAuthenticationService -enableUnixAuth > 
${logdir}/auth.log 2>&1 &
+       nohup java -Dproc_rangerusersync 
-Dlog4j.configuration=file:/etc/ranger/usersync/conf/log4j.properties 
${JAVA_OPTS} -Duser=${USER} -Dhostname=${HOSTNAME} -Dlogdir="${logdir}" -cp 
"${cp}" org.apache.ranger.authentication.UnixAuthenticationService 
-enableUnixAuth > ${logdir}/auth.log 2>&1 &
        VALUE_OF_PID=$!
     echo "Starting Apache Ranger Usersync Service"
     sleep $SLEEP_TIME_AFTER_START

Reply via email to