2017-12-20 22:09:09 +01:00
#!/bin/bash
2018-04-08 14:30:21 +02:00
# _____ _ _
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# | __| _| -_| -_| . | . | | . | . | | -_|
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
2017-12-20 22:09:09 +01:00
#
2018-04-08 14:30:21 +02:00
# Freedom in the Cloud
2017-12-20 22:09:09 +01:00
#
# Personal or small business accounts
#
# License
# =======
#
2018-01-25 19:35:39 +01:00
# Copyright (C) 2018 Bob Mottram <bob@freedombone.net>
2017-12-20 22:09:09 +01:00
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
VARIANTS='full full-vim media'
IN_DEFAULT_INSTALL=0
SHOW_ON_ABOUT=1
AKAUNTING_DOMAIN_NAME=
AKAUNTING_CODE=
AKAUNTING_ONION_PORT=8341
AKAUNTING_REPO="https://github.com/akaunting/akaunting"
AKAUNTING_COMMIT='b68c840cded60d92b86e98fcbc26ce338cf93fef'
AKAUNTING_ADMIN_PASSWORD=
AKAUNTING_BACKGROUND_IMAGE_URL=
akaunting_variables=(ONION_ONLY
AKAUNTING_DOMAIN_NAME
AKAUNTING_CODE
DDNS_PROVIDER
MY_USERNAME)
2017-12-20 23:38:28 +01:00
function akaunting_remove_bad_links {
2018-02-26 14:50:40 +01:00
cd "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" || exit 365873658
2017-12-20 23:38:28 +01:00
# copy jquery locally
jquery_version='1.12.4'
if [ ! -f jquery-${jquery_version}.js ]; then
2018-03-31 20:24:41 +02:00
cd "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" || exit 3276324
2017-12-20 23:38:28 +01:00
wget https://code.jquery.com/jquery-${jquery_version}.js
jquery_hash=$(sha256sum jquery-${jquery_version}.js | awk -F ' ' '{print $1}')
if [[ "$jquery_hash" != '430f36f9b5f21aae8cc9dca6a81c4d3d84da5175eaedcf2fdc2c226302cb3575' ]]; then
echo $'Unexpected jquery hash value'
exit 78363527
fi
fi
sed -i '/googleapi/d' resources/assets/sass/app.scss
sed -i "s|ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js|$AKAUNTING_DOMAIN_NAME/jquery-${jquery_version}.js|g" vendor/league/flysystem/docs/_layouts/default.html
sed -i '/googleapi/d' vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/503.blade.php
sed -i '/googleapi/d' vendor/almasaeed2010/adminlte/build/less/AdminLTE-without-plugins.less
sed -i '/googleapi/d' vendor/almasaeed2010/adminlte/build/less/AdminLTE.less
sed -i '/googleapi/d' vendor/almasaeed2010/adminlte/dist/css/AdminLTE.css
sed -i '/googleapi/d' vendor/almasaeed2010/adminlte/dist/css/AdminLTE.min.css
sed -i '/googleapi/d' vendor/almasaeed2010/adminlte/dist/css/alt/AdminLTE-without-plugins.css
sed -i '/googleapi/d' vendor/almasaeed2010/adminlte/dist/css/alt/AdminLTE-without-plugins.min.css
sed -i "s|ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js|$AKAUNTING_DOMAIN_NAME/jquery-${jquery_version}.js|g" vendor/almasaeed2010/adminlte/plugins/ckeditor/samples/old/jquery.html
2018-02-26 14:50:40 +01:00
chown -R www-data:www-data "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs"
2017-12-20 23:38:28 +01:00
}
2017-12-20 22:09:09 +01:00
function logging_on_akaunting {
echo -n ''
}
function logging_off_akaunting {
echo -n ''
}
function remove_user_akaunting {
remove_username="$1"
2018-02-26 14:50:40 +01:00
"${PROJECT_NAME}-pass" -u "$remove_username" --rmapp akaunting
2017-12-20 22:09:09 +01:00
}
function add_user_akaunting {
new_username="$1"
new_user_password="$2"
2018-02-26 14:50:40 +01:00
"${PROJECT_NAME}-pass" -u "$new_username" -a akaunting -p "$new_user_password"
2017-12-20 22:09:09 +01:00
echo '0'
}
function install_interactive_akaunting {
2018-02-26 14:50:40 +01:00
if [ ! "$ONION_ONLY" ]; then
2017-12-20 22:09:09 +01:00
ONION_ONLY='no'
fi
2018-02-26 14:50:40 +01:00
if [[ "$ONION_ONLY" != "no" ]]; then
2017-12-20 22:09:09 +01:00
AKAUNTING_DOMAIN_NAME='akaunting.local'
else
AKAUNTING_DETAILS_COMPLETE=
while [ ! $AKAUNTING_DETAILS_COMPLETE ]
do
2018-02-26 14:50:40 +01:00
data=$(mktemp 2>/dev/null)
2017-12-20 22:09:09 +01:00
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
dialog --backtitle $"Freedombone Configuration" \
--title $"Akaunting Configuration" \
2018-02-26 14:50:40 +01:00
--form $"\\nPlease enter your Akaunting details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 14 65 2 \
2017-12-20 22:09:09 +01:00
$"Domain:" 1 1 "$(grep 'AKAUNTING_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 25 33 40 \
$"Code:" 2 1 "$(grep 'AKAUNTING_CODE' temp.cfg | awk -F '=' '{print $2}')" 2 25 33 255 \
2018-02-26 14:50:40 +01:00
2> "$data"
2017-12-20 22:09:09 +01:00
else
dialog --backtitle $"Freedombone Configuration" \
--title $"Akaunting Configuration" \
2018-02-26 14:50:40 +01:00
--form $"\\nPlease enter your Akaunting details.\\n\\nIMPORTANT: This should be a domain name which is supported by Let's Encrypt:" 14 65 2 \
2017-12-20 22:09:09 +01:00
$"Domain:" 1 1 "$(grep 'AKAUNTING_DOMAIN_NAME' temp.cfg | awk -F '=' '{print $2}')" 1 25 33 40 \
2018-02-26 14:50:40 +01:00
2> "$data"
2017-12-20 22:09:09 +01:00
fi
sel=$?
case $sel in
2018-02-26 14:50:40 +01:00
1) rm -f "$data"
exit 1;;
255) rm -f "$data"
exit 1;;
2017-12-20 22:09:09 +01:00
esac
2018-02-26 14:50:40 +01:00
AKAUNTING_DOMAIN_NAME=$(sed -n 1p < "$data")
if [ "$AKAUNTING_DOMAIN_NAME" ]; then
2017-12-20 22:09:09 +01:00
if [[ $AKAUNTING_DOMAIN_NAME == "$HUBZILLA_DOMAIN_NAME" ]]; then
AKAUNTING_DOMAIN_NAME=""
fi
TEST_DOMAIN_NAME=$AKAUNTING_DOMAIN_NAME
validate_domain_name
2018-02-26 14:50:40 +01:00
if [[ "$TEST_DOMAIN_NAME" != "$AKAUNTING_DOMAIN_NAME" ]]; then
2017-12-20 22:09:09 +01:00
AKAUNTING_DOMAIN_NAME=
dialog --title $"Domain name validation" --msgbox "$TEST_DOMAIN_NAME" 15 50
else
if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
2018-02-26 14:50:40 +01:00
AKAUNTING_CODE=$(sed -n 2p < "$data")
2017-12-20 22:09:09 +01:00
validate_freedns_code "$AKAUNTING_CODE"
2018-02-26 14:50:40 +01:00
if [ ! "$VALID_CODE" ]; then
2017-12-20 22:09:09 +01:00
AKAUNTING_DOMAIN_NAME=
fi
fi
fi
fi
if [ $AKAUNTING_DOMAIN_NAME ]; then
AKAUNTING_DETAILS_COMPLETE="yes"
fi
2018-02-26 14:50:40 +01:00
rm -f "$data"
2017-12-20 22:09:09 +01:00
done
write_config_param "AKAUNTING_CODE" "$AKAUNTING_CODE"
fi
write_config_param "AKAUNTING_DOMAIN_NAME" "$AKAUNTING_DOMAIN_NAME"
APP_INSTALLED=1
}
function change_password_akaunting {
curr_username="$1"
new_user_password="$2"
read_config_param 'AKAUNTING_DOMAIN_NAME'
2018-02-26 14:50:40 +01:00
"${PROJECT_NAME}-pass" -u "$curr_username" -a akaunting -p "$new_user_password"
2017-12-20 22:09:09 +01:00
}
function akaunting_create_database {
2018-02-26 14:50:40 +01:00
if [ -f "$IMAGE_PASSWORD_FILE" ]; then
AKAUNTING_ADMIN_PASSWORD="$(printf "%s" "$(cat "$IMAGE_PASSWORD_FILE")")"
2017-12-20 22:09:09 +01:00
else
2018-02-26 14:50:40 +01:00
if [ ! "$AKAUNTING_ADMIN_PASSWORD" ]; then
AKAUNTING_ADMIN_PASSWORD="$(create_password "${MINIMUM_PASSWORD_LENGTH}")"
2017-12-20 22:09:09 +01:00
fi
fi
2018-02-26 14:50:40 +01:00
if [ ! "$AKAUNTING_ADMIN_PASSWORD" ]; then
2017-12-20 22:09:09 +01:00
return
fi
function_check create_database
2018-02-26 14:50:40 +01:00
create_database akaunting "$AKAUNTING_ADMIN_PASSWORD" "$MY_USERNAME"
2017-12-20 22:09:09 +01:00
}
function reconfigure_akaunting {
echo -n ''
}
function upgrade_akaunting {
CURR_AKAUNTING_COMMIT=$(get_completion_param "akaunting commit")
if [[ "$CURR_AKAUNTING_COMMIT" == "$AKAUNTING_COMMIT" ]]; then
return
fi
2018-02-26 14:50:40 +01:00
if grep -q "akaunting domain" "$COMPLETION_FILE"; then
2017-12-20 22:09:09 +01:00
AKAUNTING_DOMAIN_NAME=$(get_completion_param "akaunting domain")
fi
# update to the next commit
function_check set_repo_commit
2018-02-26 14:50:40 +01:00
set_repo_commit "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" "akaunting commit" "$AKAUNTING_COMMIT" "$AKAUNTING_REPO"
2017-12-20 22:09:09 +01:00
2018-02-26 14:50:40 +01:00
cd "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" || exit 367835
2017-12-20 23:11:24 +01:00
install_composer
2017-12-20 23:38:28 +01:00
akaunting_remove_bad_links
2017-12-20 23:11:24 +01:00
2018-02-26 14:50:40 +01:00
chown -R www-data:www-data "/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs"
2017-12-20 22:09:09 +01:00
}
function backup_local_akaunting {
2018-02-26 14:50:40 +01:00
akaunting_path="/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs"
if [ -d "$akaunting_path" ]; then
suspend_site "${AKAUNTING_DOMAIN_NAME}"
2017-12-20 22:38:00 +01:00
function_check backup_database_to_usb
backup_database_to_usb akaunting
2018-02-26 14:50:40 +01:00
backup_directory_to_usb "$akaunting_path" akaunting
2017-12-20 22:38:00 +01:00
restart_site
fi
2017-12-20 22:09:09 +01:00
}
function restore_local_akaunting {
2017-12-20 22:38:00 +01:00
temp_restore_dir=/root/tempakaunting
2018-02-26 14:50:40 +01:00
akaunting_dir="/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs"
2017-12-20 22:38:00 +01:00
2018-02-26 14:50:40 +01:00
suspend_site "${AKAUNTING_DOMAIN_NAME}"
2017-12-20 22:38:00 +01:00
function_check akaunting_create_database
akaunting_create_database
2018-02-26 14:50:40 +01:00
restore_database akaunting "${AKAUNTING_DOMAIN_NAME}"
chown www-data:www-data "$akaunting_dir"
2017-12-20 22:38:00 +01:00
restart_site
2017-12-20 22:09:09 +01:00
}
function backup_remote_akaunting {
2018-02-26 14:50:40 +01:00
akaunting_path="/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs"
if [ -d "$akaunting_path" ]; then
suspend_site "${AKAUNTING_DOMAIN_NAME}"
2017-12-20 22:38:00 +01:00
function_check backup_database_to_friend
backup_database_to_friend akaunting
2018-02-26 14:50:40 +01:00
backup_directory_to_friend "$akaunting_path" akaunting
2017-12-20 22:38:00 +01:00
restart_site
fi
2017-12-20 22:09:09 +01:00
}
function restore_remote_akaunting {
2018-02-26 14:50:40 +01:00
akaunting_dir="/var/www/${AKAUNTING_DOMAIN_NAME}/htdocs"
2017-12-20 22:38:00 +01:00
2018-02-26 14:50:40 +01:00
suspend_site "${AKAUNTING_DOMAIN_NAME}"
2017-12-20 22:38:00 +01:00
function_check akaunting_create_database
akaunting_create_database
2018-02-26 14:50:40 +01:00
restore_database_from_friend akaunting "${AKAUNTING_DOMAIN_NAME}"
chown www-data:www-data "$akaunting_dir"
2017-12-20 22:38:00 +01:00
restart_site
2017-12-20 22:09:09 +01:00
}
function remove_akaunting {
if [ ${#AKAUNTING_DOMAIN_NAME} -eq 0 ]; then
return
fi
read_config_param "AKAUNTING_DOMAIN_NAME"
read_config_param "MY_USERNAME"
echo "Removing $AKAUNTING_DOMAIN_NAME"
2018-02-26 14:50:40 +01:00
nginx_dissite "$AKAUNTING_DOMAIN_NAME"
remove_certs "$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
2018-02-26 14:50:40 +01:00
if [ -d "/var/www/$AKAUNTING_DOMAIN_NAME" ]; then
rm -rf "/var/www/$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
fi
2018-02-26 14:50:40 +01:00
if [ -f "/etc/nginx/sites-available/$AKAUNTING_DOMAIN_NAME" ]; then
rm "/etc/nginx/sites-available/$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
fi
function_check drop_database
drop_database akaunting
function_check remove_onion_service
2018-02-26 14:50:40 +01:00
remove_onion_service akaunting "${AKAUNTING_ONION_PORT}"
2017-12-20 22:09:09 +01:00
if grep -q "akaunting" /etc/crontab; then
sed -i "/akaunting/d" /etc/crontab
fi
remove_app akaunting
remove_completion_param install_akaunting
2018-02-26 14:50:40 +01:00
sed -i '/akaunting/d' "$COMPLETION_FILE"
2017-12-20 22:09:09 +01:00
function_check remove_ddns_domain
2018-02-26 14:50:40 +01:00
remove_ddns_domain "$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
}
function install_akaunting {
if [ ! $ONION_ONLY ]; then
ONION_ONLY='no'
fi
2018-02-26 14:50:40 +01:00
if [ ! "$AKAUNTING_DOMAIN_NAME" ]; then
2017-12-20 22:09:09 +01:00
echo $'No domain name was given for akaunting'
2017-12-20 22:13:45 +01:00
exit 89353
2017-12-20 22:09:09 +01:00
fi
function_check install_mariadb
install_mariadb
function_check get_mariadb_password
get_mariadb_password
apt-get -yq install php-gettext php-curl php-gd php-mysql git curl
apt-get -yq install memcached php-memcached php-intl exiftool libfcgi0ldbl
2018-02-26 14:50:40 +01:00
if [ ! -d "/var/www/$AKAUNTING_DOMAIN_NAME" ]; then
mkdir "/var/www/$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
fi
2018-02-26 14:50:40 +01:00
if [ ! -d "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" ]; then
2017-12-20 22:09:09 +01:00
if [ -d /repos/akaunting ]; then
2018-02-26 14:50:40 +01:00
mkdir "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs"
cp -r -p /repos/akaunting/. "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs"
cd "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" || exit 23458735
2017-12-20 22:09:09 +01:00
git pull
else
function_check git_clone
2018-02-26 14:50:40 +01:00
git_clone "$AKAUNTING_REPO" "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs"
2017-12-20 22:09:09 +01:00
fi
2018-02-26 14:50:40 +01:00
if [ ! -d "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" ]; then
2017-12-20 22:09:09 +01:00
echo $'Unable to clone akaunting repo'
2017-12-20 22:13:45 +01:00
exit 2589389
2017-12-20 22:09:09 +01:00
fi
fi
2018-02-26 14:50:40 +01:00
cd "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" || exit 23468724527
git checkout "$AKAUNTING_COMMIT" -b "$AKAUNTING_COMMIT"
2017-12-20 22:09:09 +01:00
set_completion_param "akaunting commit" "$AKAUNTING_COMMIT"
2018-02-26 14:50:40 +01:00
chmod g+w "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs"
chown -R www-data:www-data "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs"
2017-12-20 22:09:09 +01:00
2018-02-26 14:50:40 +01:00
cd "/var/www/$AKAUNTING_DOMAIN_NAME/htdocs" || exit 34783524
2017-12-20 22:53:18 +01:00
install_composer
2017-12-20 22:09:09 +01:00
function_check akaunting_create_database
akaunting_create_database
function_check add_ddns_domain
2018-02-26 14:50:40 +01:00
add_ddns_domain "$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
AKAUNTING_ONION_HOSTNAME=$(add_onion_service akaunting 80 ${AKAUNTING_ONION_PORT})
akaunting_nginx_site=/etc/nginx/sites-available/$AKAUNTING_DOMAIN_NAME
if [[ $ONION_ONLY == "no" ]]; then
function_check nginx_http_redirect
2018-02-26 14:50:40 +01:00
nginx_http_redirect "$AKAUNTING_DOMAIN_NAME" "index index.php"
{ echo 'server {';
echo ' listen 443 ssl;';
echo ' #listen [::]:443 ssl;';
echo " server_name $AKAUNTING_DOMAIN_NAME;";
echo ''; } >> "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
function_check nginx_compress
2018-02-26 14:50:40 +01:00
nginx_compress "$AKAUNTING_DOMAIN_NAME"
echo '' >> "$akaunting_nginx_site"
echo ' # Security' >> "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
function_check nginx_ssl
2018-02-26 14:50:40 +01:00
nginx_ssl "$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
2018-03-05 19:15:29 +01:00
function_check nginx_security_options
nginx_security_options "$AKAUNTING_DOMAIN_NAME"
2018-02-26 14:50:40 +01:00
{ echo ' add_header Strict-Transport-Security max-age=15768000;';
echo '';
echo ' access_log /dev/null;';
echo ' error_log /dev/null;';
echo '';
echo " root /var/www/$AKAUNTING_DOMAIN_NAME/htdocs;";
echo '';
echo ' index index.php;';
echo '';
echo ' location ~ \.php {';
echo ' include snippets/fastcgi-php.conf;';
echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';
echo ' fastcgi_read_timeout 30;';
echo ' }';
echo '';
echo ' location / {'; } >> "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
function_check nginx_limits
2018-02-26 14:50:40 +01:00
nginx_limits "$AKAUNTING_DOMAIN_NAME" '15m'
{ echo " try_files \$uri \$uri/ @akaunting;";
echo ' }';
echo '';
echo ' location @akaunting {';
echo " rewrite ^(.*)\$ /index.php?p=\$1 last;";
echo ' }';
echo '';
echo ' location ~ /\.(ht|git) {';
echo ' deny all;';
echo ' }';
echo '';
echo '}'; } >> "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
else
2018-02-26 14:50:40 +01:00
echo -n '' > "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
fi
2018-02-26 14:50:40 +01:00
{ echo 'server {';
echo " listen 127.0.0.1:$AKAUNTING_ONION_PORT default_server;";
echo " server_name $AKAUNTING_ONION_HOSTNAME;";
echo ''; } >> "$akaunting_nginx_site"
function_check nginx_compress
nginx_compress "$AKAUNTING_DOMAIN_NAME"
echo '' >> "$akaunting_nginx_site"
2018-03-05 19:15:29 +01:00
function_check nginx_security_options
nginx_security_options "$AKAUNTING_DOMAIN_NAME"
2018-02-26 14:50:40 +01:00
{ echo '';
echo ' access_log /dev/null;';
echo ' error_log /dev/null;';
echo '';
echo " root /var/www/$AKAUNTING_DOMAIN_NAME/htdocs;";
echo '';
echo ' index index.php;';
echo '';
echo ' location ~ \.php {';
echo ' include snippets/fastcgi-php.conf;';
echo ' fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;';
echo ' fastcgi_read_timeout 30;';
echo ' }';
echo '';
echo ' location / {'; } >> "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
function_check nginx_limits
2018-02-26 14:50:40 +01:00
nginx_limits "$AKAUNTING_DOMAIN_NAME" '15m'
{ echo " try_files \$uri \$uri/ @akaunting;";
echo ' }';
echo '';
echo ' location @akaunting {';
echo " rewrite ^(.*)\$ /index.php?p=\$1 last;";
echo ' }';
echo '';
echo ' location ~ /\.(ht|git) {';
echo ' deny all;';
echo ' }';
echo '}'; } >> "$akaunting_nginx_site"
2017-12-20 22:09:09 +01:00
function_check configure_php
configure_php
function_check create_site_certificate
2018-02-26 14:50:40 +01:00
create_site_certificate "$AKAUNTING_DOMAIN_NAME" 'yes'
2017-12-20 22:09:09 +01:00
function_check nginx_ensite
2018-02-26 14:50:40 +01:00
nginx_ensite "$AKAUNTING_DOMAIN_NAME"
2017-12-20 22:09:09 +01:00
2017-12-20 23:38:28 +01:00
akaunting_remove_bad_links
2017-12-20 22:09:09 +01:00
systemctl restart mariadb
systemctl restart php7.0-fpm
systemctl restart nginx
2018-02-26 14:50:40 +01:00
"${PROJECT_NAME}-pass" -u "$MY_USERNAME" -a akaunting -p "$AKAUNTING_ADMIN_PASSWORD"
2017-12-20 22:09:09 +01:00
set_completion_param "akaunting domain" "$AKAUNTING_DOMAIN_NAME"
APP_INSTALLED=1
}
# NOTE: deliberately there is no "exit 0"