Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NoCloud-Auto-Installer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
NoCloud-Auto-Installer
Commits
165279de
Verified
Commit
165279de
authored
Apr 16, 2018
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Set nextcloud db
parent
c3f8c680
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
installNextcloud.sh
+5
-5
5 additions, 5 deletions
installNextcloud.sh
main.env.sample
+1
-0
1 addition, 0 deletions
main.env.sample
upgradeNextcloud.sh
+1
-0
1 addition, 0 deletions
upgradeNextcloud.sh
with
7 additions
and
5 deletions
installNextcloud.sh
+
5
−
5
View file @
165279de
...
...
@@ -162,10 +162,10 @@ echo "mysql configure to nextcloud compatibility : check" \
# Create nextcloud database in mysql
echo
"create nextcloud database"
echo
"mysql -e 'CREATE DATABASE
nextcloud
CHARACTER SET =
\"
utf8mb4
\"
"
\
echo
"mysql -e 'CREATE DATABASE
${
NEXTCLOUD_DATABASE_NAME
}
CHARACTER SET =
\"
utf8mb4
\"
"
\
"COLLATE =
\"
utf8mb4_general_ci
\"
;'"
mysql
-e
'
CREATE DATABASE
nextcloud
CHARACTER
SET = "utf8mb4" COLLATE = "utf8mb4_general_ci";
'
mysql
-e
"
CREATE DATABASE
${
NEXTCLOUD_DATABASE_NAME
}
CHARACTER
\
SET =
\
"
utf8mb4
\
"
COLLATE =
\
"
utf8mb4_general_ci
\
"
;
"
echo
"Nextcloud database created"
nextcloudPassword
=
${
NEXTCLOUD_DATABASE_PASS
:-
"
$(
apg
-q
-a
0
-n
1
-m
21
-M
NCL
)
"
}
...
...
@@ -191,9 +191,9 @@ else
echo
"error processing :
$?
"
>
&2
fi
echo
"Grant all privileges to nexcloud user to
nextcloud
database"
echo
"Grant all privileges to nexcloud user to
${
NEXTCLOUD_DATABASE_NAME
}
database"
mysql
-e
"GRANT ALL PRIVILEGES on nextcloud.* to
'
nextcloud
'@'localhost' IDENTIFIED BY '
${
nextcloudPassword
}
';
'
${
NEXTCLOUD_DATABASE_NAME
}
'@'localhost' IDENTIFIED BY '
${
nextcloudPassword
}
';
FLUSH PRIVILEGES;"
;
if
[
$?
-eq
0
]
then
...
...
This diff is collapsed.
Click to expand it.
main.env.sample
+
1
−
0
View file @
165279de
...
...
@@ -9,3 +9,4 @@ export WEB_SERVER="apache2"
# but often need to be restarted after upgrade
export EXTRAS_SERVICES_TO_RESTART="systemd-logind"
export DOLIBARR_DB="dolibarr"
export NEXTCLOUD_DATABASE_NAME="nextcloud"
This diff is collapsed.
Click to expand it.
upgradeNextcloud.sh
+
1
−
0
View file @
165279de
...
...
@@ -64,6 +64,7 @@ echo "Removing old backup"
rm
-rf
$NEXTCLOUD_INSTALL_DIR
.bak
echo
"backing up nextcloud"
cp
-r
$NEXTCLOUD_INSTALL_DIR
$NEXTCLOUD_INSTALL_DIR
.bak
mysqldump
--databases
$NEXTCLOUD_DB
>
/root/nextcloud-
$current_vesion
.sql
echo
"Entering maintenance mode"
sudo
-u
$htuser
php
$occ
maintenance:mode
--on
echo
"Giving all permissions to
$htuser
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment