Skip to content

Commit bc71978

Browse files
committed
runcommand - allow the runcommand log directory to be changed.
If an entry log_dir is made in /opt/retropie/configs/all/runcommand.cfg it will be used by runcommand for saving runcommand.log/runcommand.info files instead of the default /dev/shm
1 parent 57b212d commit bc71978

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Diff for: scriptmodules/supplementary/runcommand/runcommand.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979

8080
ROOTDIR="/opt/retropie"
8181
CONFIGDIR="$ROOTDIR/configs"
82-
LOG="/dev/shm/runcommand.log"
8382

8483
RUNCOMMAND_CONF="$CONFIGDIR/all/runcommand.cfg"
8584
VIDEO_CONF="$CONFIGDIR/all/videomodes.cfg"
@@ -119,6 +118,10 @@ function get_config() {
119118
iniGet "image_delay"
120119
IMAGE_DELAY="$ini_value"
121120
[[ -z "$IMAGE_DELAY" ]] && IMAGE_DELAY=2
121+
iniGet "log_dir"
122+
LOGDIR="$ini_value"
123+
[[ -z "$LOGDIR" ]] && LOGDIR="/dev/shm"
124+
LOG="$LOGDIR/runcommand.log"
122125
fi
123126

124127
if [[ -n "$DISPLAY" ]] && $XRANDR &>/dev/null; then
@@ -1308,7 +1311,7 @@ function launch_command() {
13081311
}
13091312
13101313
function log_info() {
1311-
echo -e "$SYSTEM\n$EMULATOR\n$ROM\n$COMMAND" >/dev/shm/runcommand.info
1314+
echo -e "$SYSTEM\n$EMULATOR\n$ROM\n$COMMAND" >"$LOGDIR/runcommand.info"
13121315
}
13131316
13141317
function runcommand() {

0 commit comments

Comments
 (0)