feat: a3 and other things
This commit is contained in:
parent
dd7516e6d7
commit
4be03b9764
7 changed files with 180 additions and 82 deletions
8
bin/sc
8
bin/sc
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
SC_COMMAND="$0 $@"
|
||||
SC_SRC=${SC_SRC:-/opt/sconnect}
|
||||
. $SC_SRC/lib/setup-env
|
||||
SC_LIB=${SC_LIB:-/usr/lib/sc}
|
||||
. $SC_LIB/setup-env
|
||||
|
||||
SC_HOSTS=""
|
||||
|
||||
|
@ -29,8 +29,8 @@ for host in $SC_HOSTS; do
|
|||
else
|
||||
LOGI "attempting to install on $host..."
|
||||
rsync -au $SC_SRC/. $host:/opt/sconnect
|
||||
ssh $host SC_SKIP_WELCOME_HEADER=1 /opt/sconnect/bin/sc-client lib privileges escalate_command install -m a+rx -o root /opt/sconnect/bin/sc /usr/bin
|
||||
ssh $host SC_SKIP_WELCOME_HEADER=1 /opt/sconnect/bin/sc-client lib privileges escalate_command install -m a+rx -o root /opt/sconnect/bin/sc-client /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 /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
|
||||
LOGI "installed"
|
||||
fi
|
||||
;;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
SC_COMMAND="$0 $@"
|
||||
SC_SRC=${SC_SRC:-/opt/sconnect}
|
||||
. $SC_SRC/lib/setup-env
|
||||
SC_LIB=${SC_LIB:-/usr/lib/sc}
|
||||
. $SC_LIB/setup-env
|
||||
|
||||
show_welcome_header
|
||||
|
||||
|
@ -11,9 +11,12 @@ command=$1
|
|||
shift
|
||||
|
||||
case $command in
|
||||
update)
|
||||
LOGI attempting to update system...
|
||||
escalate lib pm upgrade_packages
|
||||
install-dotfiles)
|
||||
[ -d "$HOME/.dotfiles" ] && fatal_log "dotfiles already exist"
|
||||
LOGI installing dotfiles...
|
||||
git clone https://git.saluco.nl/strix/dotfiles $HOME/.dotfiles
|
||||
cd $HOME/.dotfiles
|
||||
./dot a
|
||||
;;
|
||||
run)
|
||||
if [ -z "$@" ]; then
|
||||
|
@ -27,18 +30,20 @@ run)
|
|||
else
|
||||
$@
|
||||
fi
|
||||
;;
|
||||
|
||||
pm)
|
||||
. $SC_LIB/pm
|
||||
case $1 in
|
||||
upgrade) pm_upgrade_packages ;;
|
||||
install) shift; pm_install_packages $@ ;;
|
||||
remove) shift; pm_remove_packages $@ ;;
|
||||
esac
|
||||
;;
|
||||
lib)
|
||||
[ $# -lt 2 ] && fatal_log "usage: $0 lib <library> <command>"
|
||||
. $SC_LIB/$1
|
||||
shift
|
||||
$@
|
||||
;;
|
||||
check)
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
fatal_log "invalid command"
|
||||
eval)
|
||||
LOGD "evaluating: $@..."
|
||||
$@
|
||||
;;
|
||||
check) exit 0 ;;
|
||||
*) fatal_log "invalid command" ;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue