Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wtlinux_server_setup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
w4t
wtlinux_server_setup
Commits
eef5c5dd
Commit
eef5c5dd
authored
Mar 12, 2025
by
w4t
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtserver 0.43
parent
97492438
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
33 deletions
+14
-33
install_owncloud.sh
distros/debian12/install_owncloud.sh
+5
-5
04_measure_duration_and_echo.sh
functions/04_measure_duration_and_echo.sh
+9
-28
No files found.
distros/debian12/install_owncloud.sh
View file @
eef5c5dd
...
@@ -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
"
\
...
...
functions/04_measure_duration_and_echo.sh
View file @
eef5c5dd
...
@@ -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
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment