Jandalf81 / rclone_script

Script to setup cloud synchronization on your RetroPie
79 stars 17 forks source link

Check if emulation station user is running installer #14

Open parker-hemphill opened 6 years ago

parker-hemphill commented 6 years ago

It is important that the "pi" user or whatever user the person running emulationstation as runs the installer. If they run as anyone else the rclone config will be created under that users home directory and inaccessible to emulationstation. A simple fix would be to add a true to the beginning of the installer script and check user running installer with something like:

[ $(ps -ef|grep '/bin/bash /usr/bin/emulationstation'|grep -v grep|awk '{print $1}') == whoami ] ||

If emulationstation isn't running or is running as a different user the check would be false and it would run the || or part of the statement