init: Explicitly set the HOME variable to the homedir of the user cloud

We have to explicitly set the HOME variable to the homedir from the user "cloud"

This is because various scripts run by the management server read the HOME variable
and fail when this init script is run manually.

For example the injectkeys.sh script reads the HOME variable
This commit is contained in:
Wido den Hollander 2013-01-09 13:11:21 +01:00
parent b18c03a006
commit ef89793c4e

View File

@ -38,6 +38,11 @@ CATALINA_HOME=@MSENVIRON@
DEFAULT=@MSCONF@/tomcat6.conf
JVM_TMP=/tmp/$NAME-temp
# We have to explicitly set the HOME variable to the homedir from the user "cloud"
# This is because various scripts run by the management server read the HOME variable
# and fail when this init script is run manually.
HOME=$(echo ~cloud)
if [ `id -u` -ne 0 ]; then
echo "You need root privileges to run this script"
exit 1