summaryrefslogtreecommitdiffstats
path: root/src/schedule.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-02-26 15:48:07 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-02-26 15:48:07 +0200
commitcf38aaa0d9074ffc26414e5ca845137381085164 (patch)
tree46488a7427964ae8fc52faab37d315b740c75498 /src/schedule.cpp
parent9ca2a086723e4303e89df98e61b19c026bbac9ef (diff)
downloadklamav-cf38aaa0d9074ffc26414e5ca845137381085164.tar.gz
klamav-cf38aaa0d9074ffc26414e5ca845137381085164.zip
Schedule script: combined variable definitions and export statements
(for brevity and clarity). Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/schedule.cpp')
-rw-r--r--src/schedule.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/schedule.cpp b/src/schedule.cpp
index 7c38efc..2a89381 100644
--- a/src/schedule.cpp
+++ b/src/schedule.cpp
@@ -361,14 +361,10 @@ TQString Schedule::createScanScript()
ts << "#!/bin/bash" << "\n";
- ts << "HOSTNAME=`hostname`" << "\n";
- ts << "export HOSTNAME" << "\n";
- ts << TQString("PATH=%1").arg(TQString(getenv("PATH"))) << "\n";
- ts << "export PATH" << "\n";
- ts << "DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n";
- ts << "export DCOPSERVER" << "\n";
- ts << "DISPLAY=:0" << "\n";
- ts << "export DISPLAY" << "\n";
+ ts << "export HOSTNAME=`hostname`" << "\n";
+ ts << TQString("export PATH=%1").arg(TQString(getenv("PATH"))) << "\n";
+ ts << "export DCOPSERVER=`cat ${HOME}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n";
+ ts << "export DISPLAY=:0" << "\n";
ts << "# Execution starts here" << "\n";
ts << "if [ \"$1\" = \"\" ]; then" << "\n";
ts << " exit 1" << "\n";