diff options
author | makefu <root@pigstarter.de> | 2014-03-09 21:44:17 +0100 |
---|---|---|
committer | makefu <root@pigstarter.de> | 2014-03-09 21:44:17 +0100 |
commit | fc166354da369e4a9e3e635d5026ecf4f8ee11f4 (patch) | |
tree | 43f6d12ce0787ba3dfa2dd8370fb27e7ed8060ee /ship/lib/filehooker | |
parent | 2e79508767ce5414c013aa4ee32722662ab6a79c (diff) |
ship:/lib/filehooker set nick
Diffstat (limited to 'ship/lib/filehooker')
-rw-r--r-- | ship/lib/filehooker | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/ship/lib/filehooker b/ship/lib/filehooker index fac84b93..bd658c42 100644 --- a/ship/lib/filehooker +++ b/ship/lib/filehooker @@ -1,22 +1,13 @@ #@include core -#@include tmux -# + netshare= dc_hub=${dc_hub:-adcs://localhost:2781} -ncdc_user=hooker -ncdc_install(){ -curl http://dev.yorhel.nl/download/ncdc-linux-x86_64-1.19.tar.gz | tar xz -C /usr/bin/ -} - +ncdc_user=${ncdc_user:-hooker} -ncdc_configure(){ +ncdc_config(){ # maybe we want to use the running ncdc process and communicate via tmux send-keys ? (sleep 1;cat;printf "/quit\n") | sudo -u $ncdc_user -# not implemented yet -# /set active -# /share $random $netshare -: } ncdc_configure_netshare(){ :${1?provide path to share} @@ -25,14 +16,27 @@ ncdc_configure_netshare(){ info "setting active as true" info "adding share" (echo "/set active true" ; - echo "/share $rnd_name $1") | ncdc_configure + echo "/share $rnd_name $1") | ncdc_config +} +ncdc_configure_nick(){ + nick=${1?nick must be provided} + info "configuring DC Nick: $nick" + echo "/nick $nick" | ncdc_config } ncdc_configure_hub(){ - info "configuring DC Hub: $dc_hub, activating autconnect" - (echo "/open c1 $dc_hub" ; - echo "/hset autoconnect true") | ncdc_configure + hub=${1:-$dc_hub} + info "configuring DC Hub: $hub, activating autconnect" + (echo "/open c1 ${hub}" ; + echo "/hset autoconnect true") | ncdc_config } + + +ncdc_install(){ +curl http://dev.yorhel.nl/download/ncdc-linux-x86_64-1.19.tar.gz | tar xz -C /usr/bin/ +useradd -m $ncdc_user ||: +} + ncdc_autostart(){ # only systemd # punani install tmux |