Added shell functions
This commit is contained in:
parent
ff953cea42
commit
bb89fe5416
4 changed files with 21 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.env.sh
|
4
README.md
Normal file
4
README.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Nikus Dotfiles
|
||||||
|
|
||||||
|
## Note for env.shell.example
|
||||||
|
Copy it and rename it to .env.sh. Don't commit one with your environment variables, that variables are secret keys
|
1
shell/env.sh.example
Normal file
1
shell/env.sh.example
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export GOTIFY_KEY=""
|
14
shell/functions.sh
Normal file
14
shell/functions.sh
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
function secure_erase {
|
||||||
|
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
||||||
|
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
||||||
|
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
||||||
|
dd if=/dev/urandom of=/dev/$1 bs=1M status=progress
|
||||||
|
curl --location --request POST 'https://gotify.cat-enby.club/message' --header 'X-Gotify-Key: $GOTIFY_KEY' --header 'Content-Type: application/json' --data-raw '{
|
||||||
|
"appid": 1,
|
||||||
|
"message": "Disk /dev/$1 successfully erased",
|
||||||
|
"title": "secure_erase complete",
|
||||||
|
"date": "$(date +"%Y-%m-%d %T")",
|
||||||
|
"priority": 5
|
||||||
|
}'
|
||||||
|
echo "Disc /dev/$1 erased successfully"
|
||||||
|
}
|
Loading…
Reference in a new issue