import directus db 4 pas possible de supprimer l'user debian sans être kick
This commit is contained in:
parent
3d76ae8811
commit
7b664fe444
|
@ -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`
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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/")
|
||||
|
|
Loading…
Reference in New Issue