Last active
June 27, 2025 05:16
-
-
Save Langerz82/516fadf5876d9dc9c1f991b1d78dded5 to your computer and use it in GitHub Desktop.
EmuELEC - emustation_arguments - ability to send additional argument to the emulationstation service.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ABOUT - Overrides the emustation service start with the ability to send arguments. | |
# CREDITS - https://www.github.com/Langerz82 - Joshua L - 2025. | |
# WARNING - Use at your own risk. | |
# copy to /emuelec/bin and "chmod +x rotate_emu_station.sh" to allow script to execute. | |
# type in: "emustation_arguments.sh delete" to remove arguments parsed to service | |
# type in: "emustation_arguments.sh --screenrotate 1" to rotate 90deg for example | |
OVERRIDE_CONF=/storage/.config/system.d/emustation.service.d/override.conf | |
function emustation_arguments () { | |
if [[ "$1" == "delete" ]]; then | |
rm -r /storage/.config/system.d/emustation.service.d | |
else | |
mkdir -p /storage/.config/system.d/emustation.service.d | |
echo [Service] > ${OVERRIDE_CONF} | |
echo ExecStart= >> ${OVERRIDE_CONF} | |
echo ExecStart=emulationstation "$@" >> ${OVERRIDE_CONF} | |
fi | |
systemctl daemon-reload | |
systemctl restart emustation | |
} | |
emustation_arguments "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment