Change the HAS pid location.
diff --git a/kerby-dist/has-dist/bin/login-test.sh b/kerby-dist/has-dist/bin/login-test.sh
index 4db4dcf..c7b66ee 100644
--- a/kerby-dist/has-dist/bin/login-test.sh
+++ b/kerby-dist/has-dist/bin/login-test.sh
@@ -31,4 +31,5 @@
fi
done
-java ${DEBUG} -classpath target/lib/*:. ${APP_MAIN} ${args}
+HAS_OPTS="-DHAS_LOGFILE=login-test"
+java ${DEBUG} -classpath target/lib/*:. ${HAS_OPTS} ${APP_MAIN} ${args}
diff --git a/kerby-dist/has-dist/bin/start-has.sh b/kerby-dist/has-dist/bin/start-has.sh
index c7e999f..ef4db63 100644
--- a/kerby-dist/has-dist/bin/start-has.sh
+++ b/kerby-dist/has-dist/bin/start-has.sh
@@ -26,7 +26,9 @@
CONF_DIR=$1
WORK_DIR=$2
-pid=/tmp/has.pid # Pid file to save pid numbers
+# Pid file to save pid numbers
+pid=/var/run/has.pid
+
APP_MAIN=org.apache.kerby.has.server.HasServer
# Reset HAS_CONF_DIR and HAS_WORK_DIR if CONF_DIR or WORK_DIR not null
diff --git a/kerby-dist/has-dist/bin/stop-has.sh b/kerby-dist/has-dist/bin/stop-has.sh
index 6ca414d..5da0093 100644
--- a/kerby-dist/has-dist/bin/stop-has.sh
+++ b/kerby-dist/has-dist/bin/stop-has.sh
@@ -17,7 +17,7 @@
# limitations under the License.
OPERATION=$1
-pid=/tmp/has.pid # Pid file
+pid=/var/run/has.pid # Pid file
stop()
{
diff --git a/kerby-dist/has-dist/conf/has-env.sh b/kerby-dist/has-dist/conf/has-env.sh
new file mode 100644
index 0000000..d390ee9
--- /dev/null
+++ b/kerby-dist/has-dist/conf/has-env.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Set HAS environment variables here.
+
+###
+# Specify the JVM options to be used when starting HAS server.
+# These options will be appended to the options specified as HAS_OPTS
+#
+# export HAS_JVM_OPTS=""
+
+# HAS work directory
+#
+# export HAS_WORK_DIR=""