| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash |
| 2 | # ========================================================================== |
| 3 | # _ _ _ ____ ____ _____ |
| 4 | # | | | (_) _ \ ___ _ __ / ___|___ _ _|_ _| __ __ _ ___ ___ _ __ |
| 5 | # | |_| | | |_) / _ \ '__| | / _ \| '_ \| || '__/ _` |/ __/ _ \ '__| |
| 6 | # | _ | | __/ __/ | | |__| (_) | | | | || | | (_| | (_| __/ | |
| 7 | # |_| |_|_|_| \___|_| \____\___/|_| |_|_||_| \__,_|\___\___|_| |
| 8 | # |
| 9 | # --- High-Performance Connectivity Tracer (HiPerConTracer) --- |
| 10 | # https://www.nntb.no/~dreibh/hipercontracer/ |
| 11 | # ========================================================================== |
| 12 | # |
| 13 | # High-Performance Connectivity Tracer (HiPerConTracer) |
| 14 | # Copyright (C) 2015-2026 by Thomas Dreibholz |
| 15 | # |
| 16 | # This program is free software: you can redistribute it and/or modify |
| 17 | # it under the terms of the GNU General Public License as published by |
| 18 | # the Free Software Foundation, either version 3 of the License, or |
| 19 | # (at your option) any later version. |
| 20 | # |
| 21 | # This program is distributed in the hope that it will be useful, |
| 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | # GNU General Public License for more details. |
| 25 | # |
| 26 | # You should have received a copy of the GNU General Public License |
| 27 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 28 | # |
| 29 | # Contact: [email protected] |
| 30 | |
| 31 | # Bash options: |
| 32 | set -e |
| 33 | |
| 34 | |
| 35 | # Copy configuration from dbtest VM: |
| 36 | if [scip-shell system . . `[`. $# -ne 1 ] ; then |
| 37 | echoscip-shell system . . echo. >&2 "Usage: $0 user@server" |
| 38 | exit 1 |
| 39 | fi |
| 40 | SERVER="${1//*@/}" |
| 41 | USER="${1//@*/}" |
| 42 | if [scip-shell system . . `[`. "${USER}" == "${SERVER}" ] ; then |
| 43 | USER="nornetpp" |
| 44 | fi |
| 45 | |
| 46 | |
| 47 | echoscip-shell system . . echo. -e "\x1b[34mCopying database access configuration from test server ...\x1b[0m" |
| 48 | |
| 49 | rsyncscip-shell system . . rsync. -v "${USER}@${SERVER}":*.{conf,crt,crl,pem} "${HOME}/" || truescip-shell system . . true. |
| 50 | |
| 51 | # -e "s/^\(dbserver[ \t]*\)=.*\$/\1= ${SERVER}/g" |
| 52 | sedscip-shell system . . sed. -e "s#^\(dbcafile[ \t]*\)=[[:space:]]*/home/${USER}/\(.*\)#\1= ${HOME}/\2#g" \ |
| 53 | -e "s#^\(dbcrlfile[ \t]*\)=[[:space:]]*/home/${USER}/\(.*\)#\1= ${HOME}/\2#g" \ |
| 54 | -i "${HOME}"/*.conf |
| 55 | |
| 56 | echoscip-shell system . . echo. -e "\x1b[34mDone!\x1b[0m" |