add functions and aliases

This commit is contained in:
Jakobus Schürz 2023-10-12 17:24:36 +02:00
parent bb1108b363
commit 797e4da5d1
3 changed files with 19 additions and 0 deletions

3
aliases_remote Normal file
View file

@ -0,0 +1,3 @@
alias deploypvp='getatsvc; TARGETDIR=/opt/atlassian/${APP_NAME}/${APP_INST_NAME}/WEB-INF/lib; COMCSV=$(ls -t /root/INSTALL/commons-csv* |head -n1); SETTINGS=$(ls -t /root/INSTALL/at.gv.bmi.atlassian.pvp.settings* |head -n1); PVP=$(ls -t /root/INSTALL/at.gv.bmi.atlassian.pvp.authenticator.*${SVC}* |head -n1); echo "Deploy $SETTINGS $PVP $COMCSV"; systemctl stop ${APP_NAME}.service ;rm ${TARGETDIR}/at.gv.bmi.* ${TARGETDIR}/$(basename $COMCSV); cp ${SETTINGS} ${PVP} ${COMCSV} ${TARGETDIR}/.; systemctl restart ${APP_NAME} --no-block ;tailatpvp'
alias getpvpversion='for base in $(find /opt/atlassian -type d -name "WEB-INF"); do echo search in "$base"; find "${base}/lib" -name "*pvp*" -exec basename {} \; ; echo "---";done'

View file

@ -1412,6 +1412,21 @@ EOF
shopt -u extglob
}
checkkernel () {
for i in /vmlinuz /boot/vmlinuz
do
[ -e "${i}" ] || continue
if [ $(basename $(readlink -f "${i}")) = vmlinuz-$(uname -r) ]
then
printf "%s\n" "Kein Upgrade notwendig. Kernel aktuell"
else
printf "%s\n" "Reboot notwendig!!"
res=1
fi
return ${res:-0}
done
}
#EOF

View file

@ -5,5 +5,6 @@ $(getbashrcfile)
${HOME}/.aliases
${HOME}/.bash_aliases
${MSC_BASE}/aliases
${MSC_BASE}/aliases_remote
${MSC_BASE}/PS1
${MSC_BASE}/bash_completion.d/*