diff options
Diffstat (limited to 'filehooker/root-image/krebs/bin')
-rwxr-xr-x | filehooker/root-image/krebs/bin/add-reaktor-secret.sh | 17 | ||||
-rwxr-xr-x | filehooker/root-image/krebs/bin/reaktor-shell.sh | 4 | ||||
-rwxr-xr-x | filehooker/root-image/krebs/bin/start-ncdc.ship | 11 |
3 files changed, 23 insertions, 9 deletions
diff --git a/filehooker/root-image/krebs/bin/add-reaktor-secret.sh b/filehooker/root-image/krebs/bin/add-reaktor-secret.sh index 8a3a5c6b..92681449 100755 --- a/filehooker/root-image/krebs/bin/add-reaktor-secret.sh +++ b/filehooker/root-image/krebs/bin/add-reaktor-secret.sh @@ -5,13 +5,20 @@ red='\e[0;31m' nc='\e[0m' black='\e[0;30m' -printf "${green}Add a Reaktor Secret${nc}\n" +printf "${green}Add a Reaktor Secret ${nc}\n" +printf "${red}(no spaces in input plox)${nc}\n" -printf "provide Nick Name:\n" nick=${1:-} -test -z "${nick:-}" && read nick -printf "provide Secret:$black\n" +while test -z "${nick:-}" ;do + printf "provide Nick Name:\n" + read nick +done + secret=${2:-} -test -z "${secret:-}" && read secret +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}" diff --git a/filehooker/root-image/krebs/bin/reaktor-shell.sh b/filehooker/root-image/krebs/bin/reaktor-shell.sh new file mode 100755 index 00000000..117c64f6 --- /dev/null +++ b/filehooker/root-image/krebs/bin/reaktor-shell.sh @@ -0,0 +1,4 @@ +#!/bin/sh +echo "IP Addresses:" +/krebs/painload/Reaktor/commands/ips || echo "no IPs!" +/krebs/bin/add-reaktor-secret.sh diff --git a/filehooker/root-image/krebs/bin/start-ncdc.ship b/filehooker/root-image/krebs/bin/start-ncdc.ship index 3251ef53..1d47bcfb 100755 --- a/filehooker/root-image/krebs/bin/start-ncdc.ship +++ b/filehooker/root-image/krebs/bin/start-ncdc.ship @@ -4,16 +4,19 @@ set -euf . /krebs/lib/filehooker #@include network ncdc_user="hooker" + useradd -m $ncdc_user ||: sudo -u $ncdc_user /usr/bin/tmux new-session -s dcpp -n ncdc -d ncdc 2>/dev/null || echo "ncdc is already running" - -dc_hub="adcs://elch.nsupdate.info:2781" +nick=$(cat /etc/hostname) +echo "using nick $nick" +ncdc_configure_nick "$nick" +sleep 1 +dc_hub="adcs://elchhub.nsupdate.info:2781" +echo "connecting to $dc_hub" ncdc_configure_hub "$dc_hub" "elch" -nick=$(get_hostname) -ncdc_configure_nick "$nick" share_all_partitions |