18 lines
319 B
Bash
18 lines
319 B
Bash
#!/usr/bin/env sh
|
|
|
|
## const
|
|
|
|
username=kvasir
|
|
repodir=repos
|
|
|
|
|
|
## exec
|
|
|
|
apt update && apt install borgbackup
|
|
|
|
useradd ${username} --create-home --home-dir=/home/${username}/${repodir} --groups sudo
|
|
# todo: add ssh key to ~/.ssh/authorized_keys
|
|
|
|
sudo --other-user=${username} mkdir --parents /home/${username}/${repodir}
|
|
|