summaryrefslogtreecommitdiffstats
path: root/filehooker/root-image/krebs/bin/add-reaktor-secret.sh
blob: 92681449875cc73fc423d4754d8964b39e7e68f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -euf
green='\e[0;32m'
red='\e[0;31m'
nc='\e[0m'
black='\e[0;30m'

printf "${green}Add a Reaktor Secret ${nc}\n"
printf "${red}(no spaces in input plox)${nc}\n"

nick=${1:-}
while test -z "${nick:-}" ;do
  printf "provide Nick Name:\n"
  read nick
done

secret=${2:-}
while test -z "${secret:-}" ;do
  printf "provide Secret:$black\n" 
  read secret
done

echo "$nick $secret" >> /krebs/painload/Reaktor/admin.lst
printf "${green}done${nc}"