generalize luserinstall script to work with any deb package
This commit is contained in:
parent
702c8f7bf7
commit
f1c39a5cf0
25
scripts/installdeb/installdeb.sh
Executable file
25
scripts/installdeb/installdeb.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
## Install luser.deb to remote host
|
||||
|
||||
DMZKEYFILE=$(echo -n ~)"/.ssh/dmz"
|
||||
|
||||
HOST="$1"
|
||||
DEB="$2"
|
||||
|
||||
if [[ -z "$HOST" ]]; then
|
||||
echo "Set Luser Host"
|
||||
echo "Usage: ./installdeb.sh HOSTNAME DEB_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$DEB" ]]; then
|
||||
echo "Set Deb package name"
|
||||
echo "Usage: ./installdeb.sh HOSTNAME DEB_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ~/src/$DEB/build-deb
|
||||
make
|
||||
ssh-add -t 100 $DMZKEYFILE
|
||||
torsocks scp $DEB.deb $HOST:~/
|
||||
torsocks ssh $HOST "apt install -y /root/$DEB.deb ; rm /root/$DEB.deb"
|
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
## Install luser.deb to remote host
|
||||
|
||||
DMZKEYFILE=$(echo -n ~)"/.ssh/dmz"
|
||||
|
||||
HOST="$1"
|
||||
|
||||
if [[ -z "$HOST" ]]; then
|
||||
echo "Set Luser Host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ~/src/luser/build-deb
|
||||
make
|
||||
ssh-add -t 100 $DMZKEYFILE
|
||||
torsocks scp luser.deb $HOST:~/
|
||||
torsocks ssh $HOST "apt install -y /root/luser.deb ; rm /root/luser.deb"
|
Loading…
Reference in New Issue
Block a user