niamtokik / arweave

The Arweave server and App Developer Toolkit.
https://www.arweave.org
GNU General Public License v2.0
0 stars 0 forks source link

arweave does not support df command on FreeBSD #4

Open niamtokik opened 2 months ago

niamtokik commented 2 months ago
[error] gen_server:error_info/7:949 Generic server ar_disksup terminating. Reason: {{badmatch,["df: invalid option -- B","usage: df [-b | -g | -H | -h | -k | -m | -P] [-acilnT] [-t type] [-,]","
niamtokik commented 2 months ago

Quick and dirty patch:

diff --git a/apps/arweave/src/ar_disksup.erl b/apps/arweave/src/ar_disksup.erl
index d1d243c4..e6ce1378 100644
--- a/apps/arweave/src/ar_disksup.erl
+++ b/apps/arweave/src/ar_disksup.erl

+disk_free_cmd({unix, freebsd}, Df, DataDirPath, Port) ->
+        my_cmd(Df ++ " -P " ++ DataDirPath ++ "/", Port)