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
6c69a569
Unverified
Commit
6c69a569
authored
Mar 22, 2017
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Mysql install Dolibarr
parent
ad1e7ab4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
installDolibarr.sh
+49
-0
49 additions, 0 deletions
installDolibarr.sh
with
49 additions
and
0 deletions
installDolibarr.sh
+
49
−
0
View file @
6c69a569
...
...
@@ -143,5 +143,54 @@ sed \
a2ensite dolibarr-ssl.conf
apachectl configtest
&&
apachectl restart
||
echo
"Failed restartin apache"
# Create dolibar database in mysql
echo
"create dolibarr database"
echo
"mysql -e 'CREATE DATABASE dolibarr;'"
mysql
-e
'CREATE DATABASE dolibarr;'
echo
"Dolibarr database created"
echo
"Create dolibarr Password for dolibarr database"
dolibarrPassword
=
${
NEXTCLOUD_DATABASE_PASS
:-
"
$(
apg
-q
-a
0
-n
1
-m
21
-M
NCL
)
"
}
echo
"Create admin Password for dolibarr"
adminPassword
=
${
NEXTCLOUD_ADMIN_PASS
=-
"
$(
apg
-q
-a
0
-n
1
-m
21
-M
NCL
)
"
}
{
echo
"[dolibarr]"
echo
"user=admin"
echo
"password=
${
adminPassword
}
"
}
>>
${
HOME
}
/.passwords
chmod
600
${
HOME
}
/.passwords
echo
"amdin user password store in
${
HOME
}
/.passwords only"
\
"readable by the root user"
echo
"Set dolibarr user for dolibarr@localhost in database"
mysql
-e
"CREATE USER 'dolibarr'@'localhost' IDENTIFIED BY
'
${
dolibarrPassword
}
';"
if
[
$?
-eq
0
]
then
echo
"dolibarr user set for dolibarr@localhost in database"
else
echo
"error processing :
$?
"
>
&2
fi
echo
"Grant all privileges to nexcloud user to dolibarr database"
mysql
-e
"GRANT ALL PRIVILEGES on dolibarr.* to
'dolibarr'@'localhost' IDENTIFIED BY '
${
dolibarrPassword
}
';
FLUSH PRIVILEGES;"
;
if
[
$?
-eq
0
]
then
echo
"Privileges granted"
else
echo
"Error processing :
$?
"
>
&2
fi
{
echo
"[dolibarr-mysql]"
echo
"user=dolibarr"
echo
"password=
${
dolibarrPassword
}
"
}
>>
${
HOME
}
/.passwords
echo
"cd
${
SCRIPT_DIRECTORY
}
"
cd
${
SCRIPT_DIRECTORY
}
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