You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/03/12 11:57:58 UTC

[incubator-datalab] 02/02: [DATALAB-2091]: added wrap in bash -l -c for redirect to file with limited access

This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2091
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 617747ca7fecea8159d40335b9d7df315b02dc7b
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Fri Mar 12 13:57:46 2021 +0200

    [DATALAB-2091]: added wrap in bash -l -c for redirect to file with limited access
---
 infrastructure-provisioning/src/general/lib/os/fab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py
index 21eff12..30961b4 100644
--- a/infrastructure-provisioning/src/general/lib/os/fab.py
+++ b/infrastructure-provisioning/src/general/lib/os/fab.py
@@ -665,7 +665,7 @@ def install_inactivity_checker(os_user, ip_address, rstudio=False):
             conn.sudo("chmod 755 /opt/inactivity/inactive.sh")
             conn.sudo("chown root:root /etc/systemd/system/inactive.service")
             conn.sudo("chown root:root /etc/systemd/system/inactive.timer")
-            conn.sudo("date +%s > /opt/inactivity/local_inactivity")
+            conn.sudo('''bash -l -c "date +%s > /opt/inactivity/local_inactivity" ''')
             conn.sudo('systemctl daemon-reload')
             conn.sudo('systemctl enable inactive.timer')
             conn.sudo('systemctl start inactive.timer')


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datalab.apache.org
For additional commands, e-mail: commits-help@datalab.apache.org