Compare commits

...

8 commits

Author SHA1 Message Date
Jakobus Schürz
1e4f8a5603 Merge remote-tracking branch 'bmi/master' 2023-01-27 16:46:08 +01:00
Jakobus Schürz
e5c3674bbb change ControlMaster 2023-01-27 16:45:15 +01:00
Jakobus Schürz
cd84947a94 remove output when Session "User" not exist 2023-01-27 16:45:15 +01:00
Jakobus Schürz
354ed21889 set pushurl from pullurl when configured 2023-01-27 16:45:15 +01:00
Jakobus Schürz
e733d4cce0 move and introduce new defaults 2023-01-27 16:44:04 +01:00
Jakobus Schürz
60dd36b807 change ControlMaster 2023-01-27 16:43:30 +01:00
Jakobus Schürz
28aabb649e remove output when Session "User" not exist 2023-01-27 16:42:52 +01:00
Jakobus Schürz
d4516a55a6 set pushurl from pullurl when configured 2023-01-23 08:30:31 +01:00
3 changed files with 11 additions and 3 deletions

View file

@ -1351,7 +1351,13 @@ setgitremote() {
git remote set-url ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PULLURL:-$MSC_GIT_PULLURL_DEFAULT}
git remote set-url --push ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} ${MSC_GIT_PUSHURL:-$MSC_GIT_PUSHURL_DEFAULT}
# sequence for push-url
# configured pushurl from .bashrc
# configured pullurl from .bashrc (if no pushrul is defined and pushurl is the same as pullurl)
# default pushurl (if no push or pullurl is defined in .bashrc)
# default pullurl (if no push/pull/default_pushurl is defined, then default pushurl is the same as default pullurl)
git remote set-url --push ${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT} \
${MSC_GIT_PUSHURL:-${MSC_GIT_PULLURL:-${MSC_GIT_PUSHURL_DEFAULT:-$MSC_GIT_PULLURL_DEFAULT}}}
git branch -u "${MSC_GIT_REMOTE_NAME:-$MSC_GIT_REMOTE_NAME_DEFAULT}"/"${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}"
git checkout ${MSC_GIT_BRANCH:-$MSC_GIT_BRANCH_DEFAULT}
loginfo "now remotes are: $(git remote -v)"

View file

@ -91,8 +91,9 @@ if ! $SSHS; then
if test ! $TMUX && test $TERM != screen; then
loginfo "no screen"
# if test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then
if tmux has-session -t User || tmux has-session -t "${USER}"; then
if tmux has-session -t User > /dev/null || tmux has-session -t "${USER}"; then
loginfo "tmux@${USER} is running"
loginfo "$(tmux list-sessions)"
STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT}
fi
fi

3
sshs
View file

@ -22,7 +22,8 @@ sshs() {
done
fi
logdebug "FILELIST1: ${FILELIST[@]}"
local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=20s -o ControlPath=~/.ssh/master-%C"
local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=20s"
#local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=auto -o ControlPersist=20s -o ControlPath=~/.ssh/master-%C"
#local SSH_OPTS="-o VisualHostKey=no -o ControlMaster=yes -o ControlPersist=10s -o ControlPath=~/.ssh/ssh-%C"
# Read /etc/bashrc or /etc/bash.bashrc (depending on distribution) and /etc/profile.d/*.sh first
#ssh -T ${SSH_OPTS} $@ "pwd" >/dev/null 2>/dev/null || { logerror "Server $@ not reachable -> exit"; return 1; }