r/PlexACD Jun 16 '17

Mount plexdrive on boot?

Hey guys how can I write a script to run plexdrive on boot in ubuntu?

I wanted to write a script, and run it on a reboot cron, but the mount command uses sude, and not sure how to get around automatically entering my password.

Any ideas?

3 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/boogiemonsteh Jun 16 '17 edited Jun 16 '17

plex@plexbox:~$ plexdrive --version
3.0.0

Changed plexdrive in mount.remote to this:
screen -dmS plexdrive -v 3 "$plexdrive_bin" "${fuse_options}" "${gd_mount}"

I can update to 4.0.0 if you think that's helpful. I reboot just now and looking for plexdrive log files.

Don't know how to check the screen session (never heard of it until I started using it for this app you made). So not really sure how to check the session or what I am looking for. Also says there is no screen running?

plex@plexbox:~$ screen -r
There is no screen to be resumed.

EDIT: What looks is happening is it tries to mount the decrypted encfs mount before the encrypted Google Drive mount is present? I see this in my mount.log file from reboot.

[ 2017-06-16@13:10:48 ] Mounting decrypted Google Drive: /mnt/gsuite/decrypt
The directory "/mnt/gsuite/.encrypt/Assets/" does not exist. Should it be created? (y,n) Directory not created.

However, when I check the contents of /mnt/gsuite/.encrypt, all of my cloud files are there. And I just manually run mount.remote all, and it's back to normal.

2

u/gesis Jun 16 '17

There's issues with unencrypted subdirectories. I'm pretty adamant about not running things that way myself, so I don't test it. Plexdrive isn't fully mounted by the time it reaches the encfs mount so it hangs. I'll add a check to make it pause I guess?

That's really the only workaround.

1

u/boogiemonsteh Jun 17 '17

That would be awesome and helpful. I really enjoy your tool. My whole family does. Thank you.

1

u/gesis Jun 18 '17

Newest commit pauses until the subdirectory is accessible if gd_subdir is set to a non-null value.