From 7b664fe44445c30ecb62a6cbeab3a8af571af741 Mon Sep 17 00:00:00 2001 From: Valentin Date: Wed, 17 Apr 2024 17:35:05 +0200 Subject: [PATCH] =?UTF-8?q?import=20directus=20db=204=20pas=20possible=20d?= =?UTF-8?q?e=20supprimer=20l'user=20debian=20sans=20=C3=AAtre=20kick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- install.sh | 6 +----- utils/export-content.sh | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9ef79ae..9a87575 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Deployment [**D**ebian](https://www.debian.org/) (os) + [**C**addy](https://cadd On a fresh install as root user using -`sudo pawwd root` +`sudo passwd root` `su - root` diff --git a/install.sh b/install.sh index e07a311..94a6b02 100644 --- a/install.sh +++ b/install.sh @@ -16,7 +16,7 @@ install_pkg() { get_username() { if [[ -z "$username" ]]; then - username=$(getent passwd 1000 | cut -d: -f1) + username=$(getent passwd 1001 | cut -d: -f1) fi } @@ -48,10 +48,6 @@ systemctl disable --now apache2 echo -e "${PURPLE}${BOLD}Create a user ? (y/N) ${RESET}" read answer if [[ "$answer" == "y" ]]; then - if id "debian" &>/dev/null; then - sudo deluser --remove-home "debian" - fi - echo -e "${PURPLE}${BOLD}Create user${RESET}" read -p "Enter username: " username diff --git a/utils/export-content.sh b/utils/export-content.sh index 242905d..d505499 100644 --- a/utils/export-content.sh +++ b/utils/export-content.sh @@ -13,7 +13,7 @@ RESET='\033[0m' echo -e "${PURPLE}${BOLD}Export Directus Database and files ? (y/N) ${RESET}" read answer if [[ "$answer" == "y" ]]; then - user=$(getent passwd 1000 | awk -F: '{print $1}') + user=$(getent passwd 1001 | awk -F: '{print $1}') site_name=$(ls /var/www/repositories/ | grep -v '^cms') db_password=$(cat /var/www/repositories/cms*/.env | grep DB_PASSWORD | sed "s/[^']*'\([^']*\)'.*/\1/")