RANGER-1372:There are some errors when I used 'sudo ranger-usersync start' command to run the Ranger UserSync Process in ubuntu 16.04.
Signed-off-by: Colm O hEigeartaigh <cohei...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/5c5b47b6 Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/5c5b47b6 Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/5c5b47b6 Branch: refs/heads/master Commit: 5c5b47b6cbbeba92523d4c393519e8ffd688f0e9 Parents: eb10179 Author: zhangqiang2 <zhangqia...@zte.com.cn> Authored: Thu Feb 9 22:52:56 2017 -0500 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Fri Feb 10 10:00:56 2017 +0000 ---------------------------------------------------------------------- unixauthservice/scripts/ranger-usersync-services.sh | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/5c5b47b6/unixauthservice/scripts/ranger-usersync-services.sh ---------------------------------------------------------------------- diff --git a/unixauthservice/scripts/ranger-usersync-services.sh b/unixauthservice/scripts/ranger-usersync-services.sh index 36eefcd..ade10ea 100644 --- a/unixauthservice/scripts/ranger-usersync-services.sh +++ b/unixauthservice/scripts/ranger-usersync-services.sh @@ -35,6 +35,13 @@ done if [ -z "${USERSYNC_PID_DIR_PATH}" ]; then USERSYNC_PID_DIR_PATH=/var/run/ranger fi + +if [ ! -d "${USERSYNC_PID_DIR_PATH}" ] +then + mkdir -p $USERSYNC_PID_DIR_PATH + chmod 660 $USERSYNC_PID_DIR_PATH +fi + pidf=${USERSYNC_PID_DIR_PATH}/usersync.pid if [ -z "${UNIX_USERSYNC_USER}" ]; then UNIX_USERSYNC_USER=ranger