Compare commits
24 Commits
13b32535c3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cfce92040 | |||
| b18ad0cf17 | |||
| 5b221ea3d9 | |||
| 224150f2e1 | |||
| e77def4e91 | |||
| 20a77e39f2 | |||
| ab0ed67ba8 | |||
| 37d04bf109 | |||
| 9d4db0e672 | |||
| 6e8880adbe | |||
| 3b4f1624f2 | |||
| 5043a3c293 | |||
| 4499205060 | |||
| 44c3451805 | |||
| 906422d16e | |||
| a50f132120 | |||
| b52a1734e1 | |||
| aaecbd4775 | |||
| 35e9760c78 | |||
| ca16530bc6 | |||
| 2ce9144060 | |||
| f685cb7d2f | |||
| fef03d4e96 | |||
| 00a78908f0 |
BIN
bin/jdupes
Executable file
BIN
bin/jdupes
Executable file
Binary file not shown.
@ -3,7 +3,11 @@
|
||||
TEMP1=$(mktemp)
|
||||
TEMP2=$(mktemp)
|
||||
|
||||
${BINARY} cli config devices ${myID} name set ${MYHOST}.${LOGNAME}
|
||||
sleep 60
|
||||
|
||||
${BINARY} cli config devices ${myID} name set ${PREFIX}${MYHOST}.${LOGNAME}
|
||||
|
||||
sleep 60
|
||||
|
||||
grep -v ${myID} ${SHARE_LIST} > ${TEMP1}
|
||||
|
||||
@ -13,6 +17,6 @@ do
|
||||
${BINARY} cli config devices add --device-id $i
|
||||
done
|
||||
|
||||
${BINARY} cli config folders default delete
|
||||
${BINARY} cli config folders default delete
|
||||
|
||||
rm -f ${TEMP1} ${TEMP2}
|
||||
|
||||
20
sbin/GitPull
20
sbin/GitPull
@ -1,6 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
echo "SCRIPT $0 starting"
|
||||
MEUID=`id -u`
|
||||
|
||||
if [ -t 1 ]
|
||||
then
|
||||
echo "interactive mode"
|
||||
# echo ${MEUID} > /var/tmp/bbb
|
||||
RUNNING_CRON=1
|
||||
else
|
||||
touch /var/tmp/aaa
|
||||
# echo ${MEUID} > /var/tmp/aaa
|
||||
RUNNING_CRON=0
|
||||
fi
|
||||
|
||||
MYNAME=`uname -n`
|
||||
|
||||
@ -16,16 +28,16 @@ pull_repo () {
|
||||
done
|
||||
}
|
||||
|
||||
# if [ $USER = root ]
|
||||
# then
|
||||
if [ ${MEUID} = 0 ]
|
||||
then
|
||||
ZZ=/zz/*
|
||||
pull_repo
|
||||
# else
|
||||
else
|
||||
ZZ=~/git/private/z*
|
||||
pull_repo
|
||||
|
||||
ZZ=~/git/public/z*
|
||||
pull_repo
|
||||
# fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
@ -25,6 +25,7 @@ clone_repo () {
|
||||
MYNAME=`uname -n`
|
||||
DELETE_ONETIME=0
|
||||
|
||||
|
||||
# set base directories
|
||||
if [ $USER != "root" ]
|
||||
then
|
||||
@ -21,6 +21,7 @@ clone_repo () {
|
||||
done
|
||||
}
|
||||
|
||||
####################
|
||||
MYNAME=`uname -n`
|
||||
DELETE_ONETIME=0
|
||||
if [ -f /zz/zPrivate/secrets/.${MYNAME}.${USER}.private ]
|
||||
@ -55,7 +56,7 @@ else
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# set base directories
|
||||
if [ $USER != "root" ]
|
||||
then
|
||||
ZZ=~/git
|
||||
@ -81,8 +82,7 @@ else
|
||||
fi
|
||||
clone_repo
|
||||
|
||||
|
||||
|
||||
# start cloning repos
|
||||
REPOSITE=${PRIVATE_SITE}
|
||||
KEYS=${PRIVATE_KEYS}
|
||||
|
||||
@ -107,6 +107,7 @@ clone_repo
|
||||
if [ ${DELETE_ONETIME} = 1 ]
|
||||
then
|
||||
rm -f /root/root.private
|
||||
echo "Deleting /root/root.private"
|
||||
fi
|
||||
|
||||
if [ $USER != "root" ]
|
||||
@ -117,3 +118,4 @@ else
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
@ -36,6 +36,8 @@ _setaliases() {
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
alias facts="echo -ne '\033[36m'; curl -s randomfunfacts.com | grep '<i>' | sed 's/.*<i>\(.*\)<\/i>.*/\1/'; echo -ne '\033[0m'; tput sgr0"
|
||||
alias taskr="/zz/zShared/bin/task restart-host"
|
||||
alias taskrd="/zz/zShared/bin/task restart-digital"
|
||||
|
||||
# show numeric permissions
|
||||
local FORMATFLAG="-c"
|
||||
@ -55,6 +57,10 @@ _setaliases() {
|
||||
|
||||
alias zansible-playbook='docker run -it --rm -v $(pwd):/ansible ${ZANSIBLE}:latest ansible-playbook'
|
||||
alias zansible-lint='docker run -it --rm -v $(pwd):/ansible ${ZANSIBLE}:latest ansible-lint'
|
||||
alias findhosts00='nmap -sn 192.168.0.0/24| grep report| sort'
|
||||
alias findhosts10='nmap -sn 192.168.1.0/24| grep report| sort'
|
||||
alias findhosts80='nmap -sn 192.168.8.0/24| grep report| sort'
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +69,7 @@ _setpath() {
|
||||
/usr/local/bin
|
||||
/usr/local/sbin
|
||||
/usr/local/sqlite/bin
|
||||
/zz/zShare/bin
|
||||
/zz/zShared/bin
|
||||
)
|
||||
|
||||
local i
|
||||
@ -230,6 +236,6 @@ export ANSIBLE_STDOUT_CALLBACK=yaml
|
||||
export GPODDER_HOME=
|
||||
export GPODDER_DOWNLOAD_DIR=
|
||||
|
||||
PATH=${PATH}:.local/bin ; export PATH
|
||||
PATH=${PATH}:~/.local/bin ; export PATH
|
||||
export SIGNAL_PHONE_NUMBER=
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ get_public_bastion () {
|
||||
cd /tmp
|
||||
rm -rf /tmp/z*
|
||||
|
||||
REPO=https://mint.nopenso.com/mirror
|
||||
REPO=https://git.cabinbagonly.com/mirror
|
||||
|
||||
which unzip
|
||||
if [ $? == 1 ]
|
||||
|
||||
@ -21,10 +21,17 @@ get_public_rsync () {
|
||||
cd /tmp
|
||||
rm -rf /tmp/z*
|
||||
|
||||
REPO=https://mint.nopenso.com/mirror
|
||||
REPO=https://git.cabinbagonly.com/mirror
|
||||
|
||||
which unzip
|
||||
if [ $? == 1 ]
|
||||
then
|
||||
curl -LJO ${REPO}/zKeys/archive/main.tar.gz
|
||||
tar -zvxf zKeys*.tar.gz
|
||||
else
|
||||
curl -LJO ${REPO}/zKeys/archive/main.zip
|
||||
unzip zKeys*.zip
|
||||
fi
|
||||
|
||||
cd zkeys
|
||||
echo "Save keys from github"
|
||||
|
||||
13
taskfiles/SharedCommon.yml
Normal file
13
taskfiles/SharedCommon.yml
Normal file
@ -0,0 +1,13 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
updatebash:
|
||||
cmds:
|
||||
- cmd: (cp /zz/zShared/shared/bashrc ~/.bashrc)
|
||||
ignore_error: true
|
||||
- cmd: (cp /zz/zShared/shared/bash_logout ~/.bash_logout)
|
||||
ignore_error: true
|
||||
- cmd: (cp /zz/zShared/shared/bash_profile ~/.bash_profile)
|
||||
ignore_error: true
|
||||
Reference in New Issue
Block a user