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
|
case $command in
|
||||||
install)
|
install)
|
||||||
if [ "$host" = "local" ]; then
|
if [ "$host" = "local" ]; then
|
||||||
escalate_command cp -r $SC_SRC/. /opt/sconnect
|
escalate_command a3 ./meta.a3 install
|
||||||
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
|
|
||||||
else
|
else
|
||||||
LOGI "attempting to install on $host..."
|
LOGI "attempting to install on $host..."
|
||||||
rsync -au $SC_SRC/. $host:/opt/sconnect
|
if ! ssh $host "command -v a3"; then
|
||||||
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
|
LOGI "no a3, installing..."
|
||||||
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
|
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"
|
LOGI "installed"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ "$host" = "local" ]; then
|
if [ "$host" = "local" ]; then
|
||||||
$SC_SRC/bin/sc-client $command $@
|
sc-client $command $@
|
||||||
else
|
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 SC_SKIP_WELCOME_HEADER=1 sc-client check 2>/dev/null || fatal_log not installed
|
||||||
ssh -t $host /opt/sconnect/bin/sc-client $command $@
|
ssh -t $host sc-client $command $@
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
6
lib/assets/saluco-header.txt
Normal file
6
lib/assets/saluco-header.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
_
|
||||||
|
___ __ _| |_ _ ___ ___
|
||||||
|
/ __|/ _` | | | | |/ __/ _ \
|
||||||
|
\__ \ (_| | | |_| | (_| (_) |
|
||||||
|
|___/\__,_|_|\__,_|\___\___/
|
||||||
|
|
9
meta.a3
Normal file
9
meta.a3
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/a3
|
||||||
|
|
||||||
|
#a3.name: sc
|
||||||
|
#a3.url: https://git.saluco.nl/strix/sconnect
|
||||||
|
#a3.author: Strix
|
||||||
|
|
||||||
|
declare_executable ./bin/sc
|
||||||
|
declare_executable ./bin/sc-client
|
||||||
|
declare_library ./lib
|
Loading…
Reference in a new issue