Boot-up Actions module init scripts should redirect output

The boot-up commands virtualmin module is a thing of wonder, much nicer that using cron.

I propose a change to the generated init script to divert stdout/stderr to /dev/null.

init scripts are started by 'startpar' commands, this command collects stdout, so if a user's commands doesn't close stdout, the startpar process never ends.

Since the Virtualmin user can never access the 'startpar' output, there doesn't seem in value in risking a bunch of lame 'startpar' processes for the entire uptime of the server.

The user can fix this themselves, but rather than hope they will, I suggest '>/dev/null 2>&1' is added to the 'su' commands in the generated init script, e.g.

Now:

'start')
su - mfat <<'VIRTUALMINEOF'
cd /home/foo
usercommandhere
VIRTUALMINEOF

Proposed change:

'start')
su - mfat >/dev/null 2>&1 <<'VIRTUALMINEOF'
cd /home/foo
usercommandhere
VIRTUALMINEOF

Status: 
Active

Comments

This could be done ... however, what if the command really does produce some useful error output that you want to see at boot time?