Skip to content

Commit a1e9bd3

Browse files
committed
dist: add installer warning for pid_directory permission requirements
1 parent ed1bec9 commit a1e9bd3

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

dist/install/install.sh

+21
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ fi
9292

9393
export TG_SHIRAKAMI_OPTIONS="${TG_SHIRAKAMI_OPTIONS}"
9494

95+
_INSTALL_WARNING_MESSAGES=""
96+
9597
echo -e "\n[Install Tsurugi]"
9698
echo "------------------------------------"
9799
cat ${TG_INSTALL_BASE_DIR}/BUILDINFO.md
@@ -120,6 +122,18 @@ if [[ ! ${TG_SKIP_INSTALL} == *"server"* ]]; then
120122
else
121123
${_SCRIPTS_DIR}/generate-tsurugi-info.sh > "${TG_INSTALL_DIR}/lib/tsurugi-info.json"
122124
fi
125+
126+
if [[ 1777 != $(stat --format=%a /var/lock/) ]]; then
127+
_WARNMSG=$(cat <<'EOF'
128+
129+
[WARNING] /var/lock/ is not set to 1777.
130+
Tsurugi uses /var/lock/ as the default location to create the lock file at startup.
131+
However, the permissions on /var/lock/ are currently not set to 1777, which prevents non-privileged users from writing to this directory.
132+
If you are starting tsurugidb process as a non-privileged user, edit the system.pid_directory parameter in var/etc/tsurugi.ini accordingly.
133+
EOF
134+
)
135+
_INSTALL_WARNING_MESSAGES="${_INSTALL_WARNING_MESSAGES}${_WARNMSG}"
136+
fi
123137
fi
124138

125139
if [[ ! ${TG_SKIP_INSTALL} == *"nativelib"* ]]; then
@@ -151,4 +165,11 @@ fi
151165
echo "------------------------------------"
152166
echo -e "[Install Tsurugi successful]"
153167
echo "Install Directory: ${TG_INSTALL_DIR}"
168+
169+
if [ "${_INSTALL_WARNING_MESSAGES}" != "" ]; then
170+
echo "${_INSTALL_WARNING_MESSAGES}"
171+
fi
172+
154173
echo "------------------------------------"
174+
175+
echo

0 commit comments

Comments
 (0)