From 27bda2db19e3f09f28d3c0507837a8ae28a97e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu> Date: Mon, 27 Feb 2017 10:26:28 +0100 Subject: [PATCH] add cp_to_monitor helper function --- 1.Base/1.Utilities/0_setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/1.Base/1.Utilities/0_setup.py b/1.Base/1.Utilities/0_setup.py index bb81a0e5..29052bc8 100644 --- a/1.Base/1.Utilities/0_setup.py +++ b/1.Base/1.Utilities/0_setup.py @@ -39,6 +39,13 @@ alias aptud='sudo apt-get update' alias aptug='sudo apt-get upgrade' # python alias rmpyc='find . -name *.pyc -type f -delete && find . -name __pycache__ -type d -delete' +function cp_to_monitor() { + url=`grep server_name /etc/nginx/sites-enabled/skyreach.conf | tail -n 1 | cut -f 2 | cut -d " " -f 2` + url="${url::-1}" + echo "cp $1 /home/msmonitor/msmonitor/logs/$1" + cp $1 /home/msmonitor/msmonitor/logs/$1 + echo "Files are available here: https://$url/storage/" +} ''' bashrc_path = os.path.expanduser('~/.bashrc') bashrc = '' -- GitLab