revert changes (don't know why they are there..)

This commit is contained in:
Jakobus Schürz 2021-09-20 08:49:25 +02:00
parent 5f72fea881
commit c48e08e9c2

View file

@ -170,7 +170,7 @@ mencfs () {
logdebug "DESTDIR: $DESTDIR" logdebug "DESTDIR: $DESTDIR"
[ -d "$DESTDIR" ] || mkdir -p "$DESTDIR" [ -d "$DESTDIR" ] || mkdir -p "$DESTDIR"
$PASS "${PKEY}" 1>/dev/null 2>&1 || { logerror "entry $PKEY does not exist in passwordsotre"; return 5; } $PASS "${PKEY}" 1>/dev/null 2>&1 || { logerror "entry $PKEY does not exist in passwordsotre"; return 5; }
local ENCFS_PASSWORD=$($PASS "${PKEY}" | head -n1) local ENCFS_PASSWORD=$($PASS show "${PKEY}")
if [ -z ${ENCDIR+x} -a -d ${ENCDIR} ];then if [ -z ${ENCDIR+x} -a -d ${ENCDIR} ];then
logerror "no encrypted directory found -> exit" logerror "no encrypted directory found -> exit"
@ -246,7 +246,7 @@ kinit-custom () {
[ -z ${PKEY+x} ] && return 3 [ -z ${PKEY+x} ] && return 3
$PASS "${PKEY}" 1>/dev/null 2>&1 || return 3 $PASS "${PKEY}" 1>/dev/null 2>&1 || return 3
local KERBEROS_PASSWORD=$($PASS "${PKEY}" | head -n1) local KERBEROS_PASSWORD=$($PASS show "${PKEY}")
local KERBEROS_USER=$($PASS "${PKEY}" | grep login | sed -e 's/^login: //' ) local KERBEROS_USER=$($PASS "${PKEY}" | grep login | sed -e 's/^login: //' )
#echo KERBEROS_PASSWORD: $KERBEROS_PASSWORD #echo KERBEROS_PASSWORD: $KERBEROS_PASSWORD
loginfo "Get kerberos-ticket for: $KERBEROS_USER@$REALM" loginfo "Get kerberos-ticket for: $KERBEROS_USER@$REALM"
@ -576,14 +576,17 @@ cat << EOF
EOF EOF
} }
function pdsh-update-hetzner() function update-hetzner-serverlist()
{ {
curl -s -H "Authorization: Bearer $(pass hetzner.com/api-token | head -n1)" \ for i in basic-services sc xe tu; do
https://api.hetzner.cloud/v1/servers \ curl -s -H "Authorization: Bearer $(pass show hetzner.com/projects/${i}/api-token)" \
| /usr/bin/jq '.servers[].public_net.ipv4.ip'|sed -e 's/\"//g' \ https://api.hetzner.cloud/v1/servers \
|while read i; do | /usr/bin/jq '.servers[].public_net.ipv4.ip'|sed -e 's/\"//g' \
dig -x $i | awk '$0 !~ /^;/ && $4 == "PTR" {print $5}' |while read i; do
done |sed -s -e 's/\.$//' > ~/.dsh/group/hetzner-servers dig -x $i | awk '$0 !~ /^;/ && $4 == "PTR" {print $5}'
done |sed -s -e 's/\.$//' > ~/.dsh/group/hetzner-servers-${i}
done
cat ~/.dsh/group/hetzner-servers-* > ~/.dsh/group/hetzner-servers
} }
function tmuxx() { function tmuxx() {
@ -727,12 +730,14 @@ gnome-shell-extensions-make-actual-permanent-systemwide() {
sudo mkdir -p "/etc/dconf/profile/" sudo mkdir -p "/etc/dconf/profile/"
local line='user-db:user' local line='user-db:user'
if [ -e "${file}" ] ; then if [ -e "${file}" ] ; then
command="grep -xqF -- ${line} ${file} || echo $line >> $file"
logtrace "$command" logtrace "$command"
sudo sh -c "$command" sudo sh -c "$command"
fi fi
local line='system-db:local' local line='system-db:local'
if [ -e "${file}" ] ; then if [ -e "${file}" ] ; then
command="grep -xqF -- ${line} ${file} || echo $line >> $file" command="grep -xqF -- ${line} ${file} || echo $line >> $file"
logtrace "$command"
sudo sh -c "$command" sudo sh -c "$command"
fi fi
local line='enabled-extensions=' local line='enabled-extensions='
@ -997,6 +1002,7 @@ convert_to_subvolume () {
set +x set +x
return 0 return 0
} }
cporig () { cporig () {