aboutsummaryrefslogtreecommitdiff
path: root/shellrc.d
diff options
context:
space:
mode:
Diffstat (limited to 'shellrc.d')
-rw-r--r--shellrc.d/function5
1 files changed, 3 insertions, 2 deletions
diff --git a/shellrc.d/function b/shellrc.d/function
index 56e648a..06a36fd 100644
--- a/shellrc.d/function
+++ b/shellrc.d/function
@@ -1,8 +1,9 @@
# vim: ft=sh:
# Run process in background
-tobg() {
- "$@" >/dev/null 2>&1 &
+tbg() {
+ mkdir -p /tmp/tbg-log
+ nohup "$@" >/dev/null >/tmp/tbg-log/$0-$(date +%g%m%d%H%M%S%N) &
}
# Generate random password (optionally takes length of password as first argument)