18 lines
739 B
Bash
18 lines
739 B
Bash
#!/bin/bash
|
|
|
|
echo "Checking if you are root"
|
|
if [[ $EUID > 0 ]]; then
|
|
echo "Not running as root, exiting"
|
|
exit
|
|
fi
|
|
|
|
apt-get install librest-client-perl git -y
|
|
git clone https://github.com/TheGrandWazoo/freenas-proxmox
|
|
|
|
## Patches
|
|
patch -b /usr/share/perl5/PVE/Storage/ZFSPlugin.pm < freenas-proxmox/perl5/PVE/Storage/ZFSPlugin.pm.patch
|
|
patch -b /usr/share/pve-docs/api-viewer/apidoc.js < freenas-proxmox/pve-docs/api-viewer/apidoc.js.patch
|
|
patch -b /usr/share/pve-manager/js/pvemanagerlib.js < freenas-proxmox/pve-manager/js/pvemanagerlib.js.patch
|
|
cp -v freenas-proxmox/perl5/PVE/Storage/LunCmd/FreeNAS.pm /usr/share/perl5/PVE/Storage/LunCmd/
|
|
mkdir /usr/share/perl5/REST
|
|
cp -v freenas-proxmox/perl5/REST/Client.pm /usr/share/perl5/REST/ |