What does this job execute?

Moderator: crythias

Locked
tupson
Znuny advanced
Posts: 133
Joined: 07 Oct 2015, 05:54
Znuny Version: 7.0.2
Real Name: Tony
Company: Upson Productions, LLC
Location: DC

What does this job execute?

Post by tupson »

This job was pre-configured within the Debian OTRS Appliance and it was enabled in 'test-mode' so it wasnt running.

What does this job execute if I remove the test command?

/run/otrs || mkdir -p /run/otrs && chown otrs:www-data /run/otrs && chmod 770 /run/otrs
Tony :mrgreen:
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
EXG133
Znuny expert
Posts: 217
Joined: 06 Aug 2012, 18:12
Znuny Version: 3.1.7 & 4.04

Re: What does this job execute?

Post by EXG133 »

That's strange. The first part isn't really a command, are you sure you didn't leave something out?

/run/otrs/
'||' means only continue if previous command failed
'mkdir -p /run/otrs' create the directory
'&&' means only continue if previous command succeeded (technically if it returned 0, usually this means succeeded)
'chown otrs:www-data /run/otrs' change the owner and groep of the folder /run/otrs to otrs:www-data
'&&' means only continue if previous command succeeded (technically if it returned 0, usually this means succeeded)
'chmod 770 /run/otrs' give the user and group rwx rights on the folder
tupson
Znuny advanced
Posts: 133
Joined: 07 Oct 2015, 05:54
Znuny Version: 7.0.2
Real Name: Tony
Company: Upson Productions, LLC
Location: DC

Re: What does this job execute?

Post by tupson »

test -d is right before the line (sorry)

test -d /run/otrs || mkdir -p /run/otrs && chown otrs:www-data /run/otrs && chmod 770 /run/otrs


this line also appears to be in the watchdog file

//// schedule_watchdog.dist is configured as such:

# check scheduler status

*/5 * * * * root test -d /run/otrs || mkdir -p /run/otrs && chown otrs:www-data /run/otrs && chmod 770 /run/otrs
Tony :mrgreen:
OTRS version installed: v7.0.2 (.rpm)
OS: CENTOS7 (latest updates via -yum install)
OS: Ubuntu 20.04.3 (latest apt-get upgrades)
GURU: Microsoft & VMware Environments
Locked