Skip to content

Instantly share code, notes, and snippets.

@djekl
Last active January 30, 2023 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djekl/6336a86e87746bf736489733ad13b52c to your computer and use it in GitHub Desktop.
Save djekl/6336a86e87746bf736489733ad13b52c to your computer and use it in GitHub Desktop.
Unraid PlexDrive Plugin
<?xml version='1.0' standalone='yes'?>
<!-- PLUGIN DEFINITIONS -->
<!DOCTYPE PLUGIN [
<!ENTITY name "plexdrive">
<!ENTITY author "djekl">
<!ENTITY version "2023.01.27">
<!ENTITY pdversion "latest">
<!ENTITY repo "https://github.com/plexdrive/plexdrive/releases">
<!ENTITY pluginURL "https://gist.githubusercontent.com/&author;/6336a86e87746bf736489733ad13b52c/raw/fe055e9023d7308d2b14408154ad755792196993/plexdrive.plg">
<!ENTITY plugin "/boot/config/plugins/&name;">
<!ENTITY emhttp "/usr/local/emhttp/plugins/&name;">
]>
<PLUGIN name="&name;"
author="&author;"
version="&version;"
pluginURL="&pluginURL;"
>
<CHANGES>
</CHANGES>
<FILE Name="&emhttp;/README.md">
<INLINE>
**plexdrive**
Plexdrive allows you to mount your Google Drive account as fuse filesystem.
The project is comparable to projects like [rclone](https://rclone.org/) or [node-gdrive-fuse](https://github.com/thejinx0r/node-gdrive-fuse), but optimized for media streaming e.g. with plex ;)
</INLINE>
</FILE>
<FILE Name="&plugin;/install/plexdrive-linux-amd64">
<URL>&repo;/latest/download/plexdrive-linux-amd64</URL>
</FILE>
<!--
Install script.
-->
<FILE Run="/bin/bash" Method="install">
<INLINE>
echo "+=============================================================================="
echo "| Installing &name;"
echo "+=============================================================================="
cp &plugin;/install/plexdrive-linux-amd64 /usr/sbin/plexdrive
chown root:root /usr/sbin/plexdrive
chmod 755 /usr/sbin/plexdrive
echo ""
echo "-----------------------------------------------------------"
echo " &name; has been installed."
echo "-----------------------------------------------------------"
echo ""
</INLINE>
</FILE>
<!-- PLUGIN REMOVAL SCRIPT -->
<FILE Run="/bin/bash" Method="remove">
<INLINE>
echo "+=============================================================================="
echo "| Uninstalling &name;"
echo "+=============================================================================="
# Remove plugin related files
rm -rf /usr/local/emhttp/plugins/&name;
rm -rf /boot/config/plugins/&name;
rm -rf /usr/sbin/&name;
rm -rf /usr/sbin/plexdriveorig
echo ""
echo "&name; uninstalled. &name; will remain until your next system reboot."
</INLINE>
</FILE>
</PLUGIN>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment