Skip to content

Commit 1732672

Browse files
limc5462limengchen
andauthored
[Improve] Add user environment configuration script in conf directory (#4292)
* [Improve] Add user environment variable configuration file * Add shebang line --------- Co-authored-by: limengchen <limengchen@limengchendeMac-mini.local>
1 parent df68b24 commit 1732672

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

streampark-console/streampark-console-service/src/main/assembly/bin/streampark.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ elif [[ -r "$APP_HOME/bin/setenv.sh" ]]; then
149149
. "$APP_HOME/bin/setenv.sh"
150150
fi
151151

152+
# The user can be specified in the conf/streampark-env.sh.
153+
if [[ -f "${APP_CONF}/streampark-env.sh" ]]; then
154+
. "${APP_CONF}/streampark-env.sh"
155+
fi
156+
152157
# For Cygwin, ensure paths are in UNIX format before anything is touched
153158
if ${cygwin}; then
154159
# shellcheck disable=SC2006
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
# Many of the options here are built from the perspective that users
20+
# may want to provide OVERWRITING values on the command line.
21+
# For example:
22+
#
23+
# JAVA_HOME=/usr/java
24+
#
25+
# Therefore, the vast majority (BUT NOT ALL!) of these defaults
26+
# are configured for substitution and not append. If append
27+
# is preferable, modify this file accordingly.
28+
29+
###
30+
# Generic settings for STREAMPARK
31+
###
32+
33+
# Technically, the only required environment variable is JAVA_HOME.
34+
# All others are optional. However, the defaults are probably not
35+
# preferred. Many sites configure these options outside of streampark,
36+
# such as in /etc/profile.d
37+
38+
# The java implementation to use. By default, this environment
39+
# variable is REQUIRED on ALL platforms except OS X!
40+
# export JAVA_HOME=

0 commit comments

Comments
 (0)