From b3def8f64773fa9421e5287d0b4e868787e101bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Mon, 9 May 2022 21:55:45 +0300 Subject: [PATCH] Create and set up necessary folders --- bin/install.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/install.sh b/bin/install.sh index 7a99a9f5d..1e925d934 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -63,6 +63,19 @@ function print_separator() { echo -e "\e[1m----------------------------------------------------\e[0m" } +# Create necessary directories if they don't exist +function create_directories() { + mkdir -p $PATH_PREFIX/src/bb-data/{cache,log,uploads} +} + +# Change folder permissions +function change_folder_permissions() { + print_info "Changing folder permissions..." + chmod -R 777 $PATH_PREFIX/src/bb-data/{cache,log,uploads} + chmod -R 777 $PATH_PREFIX/src/bb-themes + print_success "Folder permissions changed." +} + # Start BoxBilling with a full rebuild function rebuild_and_start() { print_header "Starting BoxBilling with a full rebuild..." @@ -162,9 +175,11 @@ if [ -f "$PATH_PREFIX/src/bb-config.php" ]; then print_separator fi +create_directories +change_folder_permissions rebuild_and_start install_composer_dependencies remove_installation_leftovers print_success "\e[1mInstallation complete.\e[0m" -print_header "To create your administrator account, please visit the following URL: http://localhost/bb-admin" \ No newline at end of file +print_header "To create your administrator account, please visit the following URL: http://localhost/bb-admin"