Change how the cd to Plex works since su just opens a new session and su -c closes the new session. Tried all combinations of -i -l -m -p with -c and none drop the user in a root shell after the command has been run.
This commit is contained in:
@@ -371,7 +371,13 @@ plex_dir='/data/user/0/com.plexapp.android/Plex Media Server/Sync/1'
|
|||||||
plex_movie_dir="$plex_dir"/1
|
plex_movie_dir="$plex_dir"/1
|
||||||
plex_series_dir="$plex_dir"/2
|
plex_series_dir="$plex_dir"/2
|
||||||
function plex {
|
function plex {
|
||||||
su -c "cd '$plex_dir'"
|
if [[ "$LOGNAME" == "root" ]]; then
|
||||||
|
cd "$plex_dir"
|
||||||
|
else
|
||||||
|
echo "Hopping into root, use this to go to plex's directory: "
|
||||||
|
echo "cd '$plex_dir'"
|
||||||
|
su
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
function pull-plex {
|
function pull-plex {
|
||||||
dest="$1"
|
dest="$1"
|
||||||
|
|||||||
Reference in New Issue
Block a user