Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
b382bf9d
Commit
b382bf9d
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Use install command
parent
a4f87c4c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-akaunting
+25
-56
25 additions, 56 deletions
src/freedombone-app-akaunting
with
25 additions
and
56 deletions
src/freedombone-app-akaunting
+
25
−
56
View file @
b382bf9d
...
...
@@ -51,63 +51,17 @@ akaunting_variables=(ONION_ONLY
AKAUNTING_DOMAIN_NAME
AKAUNTING_CODE
DDNS_PROVIDER
MY_USERNAME
)
function
akaunting_generate_env
{
akaunting_url
=
"https://
${
AKAUNTING_DOMAIN_NAME
}
"
if
[[
"
$ONION_ONLY
"
!=
'no'
]]
;
then
akaunting_url
=
"http://
${
AKAUNTING_ONION_HOSTNAME
}
"
fi
akaunting_key_bytes
=
"
$(
create_random_string 16
)$(
create_random_string 16
)
"
akaunting_key
=
$(
echo
-n
"
$akaunting_key_bytes
"
|
base64
)
MARIADB_PASSWORD
=
$(
"
${
PROJECT_NAME
}
-pass"
-u
root
-a
mariadb
)
{
echo
'APP_NAME=Akaunting'
;
echo
'APP_ENV=production'
;
echo
'APP_LOCALE='
;
echo
'APP_INSTALLED=false'
;
echo
"APP_KEY=base64:
${
akaunting_key
}
"
;
echo
'APP_DEBUG=true'
;
echo
'APP_LOG_LEVEL=debug'
echo
"APP_URL=
${
akaunting_url
}
"
;
echo
''
;
echo
'DB_CONNECTION=mysql'
;
echo
'DB_HOST=localhost'
;
echo
'DB_PORT=3306'
;
echo
'DB_DATABASE=akaunting'
;
echo
'DB_USERNAME=root'
;
echo
"DB_PASSWORD=
${
MARIADB_PASSWORD
}
"
;
echo
'DB_PREFIX='
;
echo
''
;
echo
'BROADCAST_DRIVER=log'
;
echo
'CACHE_DRIVER=file'
;
echo
'SESSION_DRIVER=file'
;
echo
'QUEUE_DRIVER=database'
;
echo
''
;
echo
'MAIL_DRIVER=mail'
;
echo
'MAIL_HOST=localhost'
;
echo
'MAIL_PORT=25'
;
echo
'MAIL_USERNAME=null'
;
echo
'MAIL_PASSWORD=null'
;
echo
'MAIL_ENCRYPTION=null'
;
}
>
"/var/www/
${
AKAUNTING_DOMAIN_NAME
}
/htdocs/.env"
chown
www-data:www-data
"/var/www/
${
AKAUNTING_DOMAIN_NAME
}
/htdocs/.env"
cd
"/var/www/
${
AKAUNTING_DOMAIN_NAME
}
/htdocs"
||
exit
28
php artisan db:seed
--force
php artisan migrate:refresh
--force
}
MY_USERNAME
MY_EMAIL_ADDRESS
)
function
akaunting_update_email
{
mail_config_filename
=
"/var/www/
$AKAUNTING_DOMAIN_NAME
/htdocs/config/mail.php"
if
[
-f
"
$mail_config_filename
"
]
;
then
if
grep
-q
"'MAIL_PORT', 587"
"
$mail_config_filename
"
;
then
sed
-i
"s|'MAIL_PORT', 587|'MAIL_PORT', 25|g"
"
$mail_config_filename
"
fi
if
!
grep
-q
"'MAIL_ENCRYPTION', null"
"
$mail_config_filename
"
;
then
sed
-i
"s|'MAIL_ENCRYPTION', 'tls'|'MAIL_ENCRYPTION', null|g"
"
$mail_config_filename
"
fi
env_filename
=
"/var/www/
$AKAUNTING_DOMAIN_NAME
/htdocs/.env"
if
[
!
-f
"
$env_filename
"
]
;
then
echo
$'No .env file found'
return
fi
if
!
grep
-q
'MAIL_PORT=25'
"
$env_filename
"
;
then
sed
-i
's|MAIL_PORT=.*|MAIL_PORT=25|g'
"
$env_filename
"
fi
}
...
...
@@ -417,10 +371,25 @@ function install_akaunting {
increment_app_install_progress
akaunting_generate_env
MARIADB_PASSWORD
=
$(
"
${
PROJECT_NAME
}
-pass"
-u
root
-a
mariadb
)
php artisan
install
-n
\
--db-host
=
localhost
\
--db-port
=
3306
\
--db-name
=
akaunting
\
--db-username
=
root
\
--db-password
=
"
$MARIADB_PASSWORD
"
\
--company-name
=
"
$PROJECT_NAME
"
\
--company-email
=
"
$MY_EMAIL_ADDRESS
"
\
--admin-email
=
"
$MY_EMAIL_ADDRESS
"
\
--admin-password
=
"
$AKAUNTING_ADMIN_PASSWORD
"
increment_app_install_progress
if
[
!
-f
"/var/www/
$AKAUNTING_DOMAIN_NAME
/htdocs/.env"
]
;
then
echo
$'No .env file generated'
exit
72
fi
akaunting_update_email
increment_app_install_progress
...
...
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
register
or
sign in
to comment