mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-30 04:15:13 +08:00
update 2026-09-26 17:00:06
This commit is contained in:
1 parent
97ae9f68da
commit
bcc9ceb04a
4756 files changed
+1670713
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
TASK_ID="$1"
|
||||
TASK_CMD="$2"
|
||||
|
||||
exec </dev/null >>"/var/log/tasks/$TASK_ID.log" 2>&1
|
||||
|
||||
export HOME=/root
|
||||
export TERM=xterm-256color
|
||||
|
||||
exec script -efqc 'onexit() {
|
||||
/etc/init.d/tasks _task_onstop "'"$TASK_ID"'" "$?"
|
||||
}
|
||||
trap onexit EXIT;
|
||||
stty cols 80 rows 24;
|
||||
'"$TASK_CMD" /dev/null
|
||||
Reference in new issue
Block a user