Skip to content

Commit

Permalink
Added missing scripts...
Browse files Browse the repository at this point in the history
  • Loading branch information
coderPaddyS committed Mar 10, 2022
1 parent e779593 commit 24901e2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions delad
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

source /opt/docker/mariadb/.env

sudo userdel "$2"
docker exec -it mariadb_db_1 mysql --password="$SQL_PASSWORD" backenddb -e "UPDATE user SET authorities = 'USER' WHERE name = '$1';"

unset SQL_PASSWORD
11 changes: 11 additions & 0 deletions regad
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

source /opt/docker/mariadb/.env

sudo useradd -m -p kit-finder-admin -g pse "$2"
sudo -u "$2" mkdir "/home/$2/.ssh"
sudo -u "$2" touch "/home/$2/.ssh/authorized_keys"
echo "$3" | sudo -u "$2" tee -a "/home/$1/.ssh/authorized_keys"
docker exec -it mariadb_db_1 mysql --password="$SQL_PASSWORD" backenddb -e "UPDATE user SET authorities = 'USER,ADMIN' WHERE name = '$1';"

unset SQL_PASSWORD

0 comments on commit 24901e2

Please sign in to comment.