Commit eef5c5dd authored by w4t's avatar w4t

wtserver 0.43

parent 97492438
...@@ -140,16 +140,16 @@ htuser='www-data' ...@@ -140,16 +140,16 @@ htuser='www-data'
htgroup='www-data' htgroup='www-data'
rootuser='root' rootuser='root'
printf "Creating possible missing Directories\n" #printf "Creating possible missing Directories\n"
mkdir -p \$ocpath/data mkdir -p \$ocpath/data
mkdir -p \$ocpath/assets mkdir -p \$ocpath/assets
mkdir -p \$ocpath/updater mkdir -p \$ocpath/updater
printf "chmod Files and Directories\n" #printf "chmod Files and Directories\n"
find \${ocpath}/ -type f -print0 | xargs -0 chmod 0640 find \${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find \${ocpath}/ -type d -print0 | xargs -0 chmod 0770 find \${ocpath}/ -type d -print0 | xargs -0 chmod 0770
printf "Setting directory ownership\n" #printf "Setting directory ownership\n"
chown -R \${rootuser}:\${htgroup} \${ocpath}/ chown -R \${rootuser}:\${htgroup} \${ocpath}/
chown -R \${htuser}:\${htgroup} \${ocpath}/apps/ chown -R \${htuser}:\${htgroup} \${ocpath}/apps/
chown -R \${htuser}:\${htgroup} \${ocpath}/assets/ chown -R \${htuser}:\${htgroup} \${ocpath}/assets/
...@@ -160,7 +160,7 @@ chown -R \${htuser}:\${htgroup} \${ocpath}/updater/ ...@@ -160,7 +160,7 @@ chown -R \${htuser}:\${htgroup} \${ocpath}/updater/
chmod +x \${ocpath}/occ chmod +x \${ocpath}/occ
printf "Setting .htaccess permissions\n" #printf "Setting .htaccess permissions\n"
if [ -f \${ocpath}/.htaccess ]; then if [ -f \${ocpath}/.htaccess ]; then
chmod 0644 \${ocpath}/.htaccess chmod 0644 \${ocpath}/.htaccess
chown \${rootuser}:\${htgroup} \${ocpath}/.htaccess chown \${rootuser}:\${htgroup} \${ocpath}/.htaccess
...@@ -253,7 +253,7 @@ EOF ...@@ -253,7 +253,7 @@ EOF
--database "mysql" \ --database "mysql" \
--database-name "$CFG_CLOUDDBNAME" \ --database-name "$CFG_CLOUDDBNAME" \
--database-user "$CFG_CLOUDDBUSER" \ --database-user "$CFG_CLOUDDBUSER" \
--database-pass "$CFG_CLOUDDBPWD" \ --database-pass "$CFG_CLOUDDBPWD" \
--database-host "$CFG_CLOUDDBHOST" \ --database-host "$CFG_CLOUDDBHOST" \
--database-port "3306" \ --database-port "3306" \
--admin-user "$CFG_CLOUDADMINUSER" \ --admin-user "$CFG_CLOUDADMINUSER" \
......
...@@ -2,33 +2,14 @@ ...@@ -2,33 +2,14 @@
# Function: MeasureTimeDuration # Function: MeasureTimeDuration
# Calculate the duration and display it # Calculate the duration and display it
#--------------------------------------------------------------------- #---------------------------------------------------------------------
#MeasureTimeDuration() {
# if [ -z "$1" ]; # Is parameter #1 zero length?
# then
# echo "-Parameter #1 is zero length." # Or no parameter passed.
# else
# ELAPSED_TIME=$(($SECONDS - $1))
# echo -n -e "$IDENTATION_LVL_0 ${green}Completed ON ${NC}"
# echo -e ": ${red} $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) sec ${NC}"
# echo
# fi
#}
MeasureTimeDuration() { MeasureTimeDuration() {
if [ -z "$1" ]; then if [ -z "$1" ]; # Is parameter #1 zero length?
echo "-Parameter #1 is zero length." # Or no parameter passed. then
else echo "-Parameter #1 is zero length." # Or no parameter passed.
CURRENT_TIME=$(date +%s) else
START_TIME_SEC=${1%.*} ELAPSED_TIME=$(($SECONDS - $1))
echo -n -e "$IDENTATION_LVL_0 ${green}Completed ON ${NC}"
ELAPSED_TIME=$(($CURRENT_TIME - $START_TIME_SEC)) echo -e ": ${red} $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) sec ${NC}"
echo
MINUTES=$(($ELAPSED_TIME / 60)) fi
SECONDS=$(($ELAPSED_TIME % 60))
echo -n -e "$IDENTATION_LVL_0 ${green}Completed ON ${NC}"
echo -e ": ${red} $MINUTES min $SECONDS sec ${NC}"
echo
fi
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment