feat: a3 (fr this time)
This commit is contained in:
parent
4be03b9764
commit
b3ec7ee32f
3 changed files with 24 additions and 9 deletions
18
bin/sc
18
bin/sc
|
@ -23,23 +23,23 @@ for host in $SC_HOSTS; do
|
|||
case $command in
|
||||
install)
|
||||
if [ "$host" = "local" ]; then
|
||||
escalate_command cp -r $SC_SRC/. /opt/sconnect
|
||||
escalate_command install -m a+rx -o root /opt/sconnect/bin/sc /usr/bin
|
||||
escalate_command install -m a+rx -o root /opt/sconnect/bin/sc-client /usr/bin
|
||||
escalate_command a3 ./meta.a3 install
|
||||
else
|
||||
LOGI "attempting to install on $host..."
|
||||
rsync -au $SC_SRC/. $host:/opt/sconnect
|
||||
ssh $host SC_SKIP_WELCOME_HEADER=1 SC_INCLUDE_LIBS="privileges" /opt/sconnect/bin/sc-client eval escalate_command install -m a+rx -o root /opt/sconnect/bin/sc /usr/bin
|
||||
ssh $host SC_SKIP_WELCOME_HEADER=1 SC_INCLUDE_LIBS="privileges" /opt/sconnect/bin/sc-client eval escalate_command install -m a+rx -o root /opt/sconnect/bin/sc-client /usr/bin
|
||||
if ! ssh $host "command -v a3"; then
|
||||
LOGI "no a3, installing..."
|
||||
ssh -t $host "git clone https://git.saluco.nl/strix/aaa /tmp/a3 && cd /tmp/a3 && sudo A3_LIB=./lib bin/a3 ./meta.a3 install; rm -rf /tmp/a3"
|
||||
fi
|
||||
ssh $host "git clone https://git.saluco.nl/strix/sconnect /tmp/sconnect && cd /tmp/sconnect && sudo a3 /tmp/sconnect/main.a3 install; rm -rf /tmp/sconnect"
|
||||
LOGI "installed"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [ "$host" = "local" ]; then
|
||||
$SC_SRC/bin/sc-client $command $@
|
||||
sc-client $command $@
|
||||
else
|
||||
ssh -t $host SC_SKIP_WELCOME_HEADER=1 /opt/sconnect/bin/sc-client check 2>/dev/null || fatal_log not installed
|
||||
ssh -t $host /opt/sconnect/bin/sc-client $command $@
|
||||
ssh -t $host SC_SKIP_WELCOME_HEADER=1 sc-client check 2>/dev/null || fatal_log not installed
|
||||
ssh -t $host sc-client $command $@
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue