Commit eef5c5dd authored by w4t's avatar w4t

wtserver 0.43

parent 97492438
......@@ -140,16 +140,16 @@ htuser='www-data'
htgroup='www-data'
rootuser='root'
printf "Creating possible missing Directories\n"
#printf "Creating possible missing Directories\n"
mkdir -p \$ocpath/data
mkdir -p \$ocpath/assets
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 d -print0 | xargs -0 chmod 0770
printf "Setting directory ownership\n"
#printf "Setting directory ownership\n"
chown -R \${rootuser}:\${htgroup} \${ocpath}/
chown -R \${htuser}:\${htgroup} \${ocpath}/apps/
chown -R \${htuser}:\${htgroup} \${ocpath}/assets/
......@@ -160,7 +160,7 @@ chown -R \${htuser}:\${htgroup} \${ocpath}/updater/
chmod +x \${ocpath}/occ
printf "Setting .htaccess permissions\n"
#printf "Setting .htaccess permissions\n"
if [ -f \${ocpath}/.htaccess ]; then
chmod 0644 \${ocpath}/.htaccess
chown \${rootuser}:\${htgroup} \${ocpath}/.htaccess
......
......@@ -2,33 +2,14 @@
# Function: MeasureTimeDuration
# 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() {
if [ -z "$1" ]; then
if [ -z "$1" ]; # Is parameter #1 zero length?
then
echo "-Parameter #1 is zero length." # Or no parameter passed.
else
CURRENT_TIME=$(date +%s)
START_TIME_SEC=${1%.*}
ELAPSED_TIME=$(($CURRENT_TIME - $START_TIME_SEC))
MINUTES=$(($ELAPSED_TIME / 60))
SECONDS=$(($ELAPSED_TIME % 60))
ELAPSED_TIME=$(($SECONDS - $1))
echo -n -e "$IDENTATION_LVL_0 ${green}Completed ON ${NC}"
echo -e ": ${red} $MINUTES min $SECONDS sec ${NC}"
echo -e ": ${red} $(($ELAPSED_TIME/60)) min $(($ELAPSED_TIME%60)) 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