diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2025-02-01 15:56:29 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2025-02-01 15:56:29 +0200 |
commit | 09e3a2e9b3111f5e6605121f6419c670135dd921 (patch) | |
tree | 6ddbc9eebd9db168d07404927eeeaf34227e5ce7 | |
parent | 79dd9576005069d1099afb55d5adae530f3235d9 (diff) | |
download | arching-kaos-tools-09e3a2e9b3111f5e6605121f6419c670135dd921.tar.gz arching-kaos-tools-09e3a2e9b3111f5e6605121f6419c670135dd921.tar.bz2 arching-kaos-tools-09e3a2e9b3111f5e6605121f6419c670135dd921.zip |
Wrapper for running IPFS/KUBO commandsHEADorigin/masterorigin/HEADmaster
-rwxr-xr-x | bin/ak-ipfs (renamed from bin/ak-ipfs-daemon) | 2 | ||||
-rwxr-xr-x | lib/_ak_ipfs | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bin/ak-ipfs-daemon b/bin/ak-ipfs index e9a9bca..376c3c0 100755 --- a/bin/ak-ipfs-daemon +++ b/bin/ak-ipfs @@ -24,6 +24,7 @@ ## ## -h, --help Prints this help message ## -d, --daemon Starts IPFS daemon for AK +## -r, --run Runs an IPFS command for AK ## fullprogrampath="$(realpath $0)" PROGRAM=$(basename $0) @@ -39,6 +40,7 @@ then case $1 in -h | --help) _ak_usage; exit;; -d | --daemon) _ak_ipfs_starter; exit;; + -r | --run) shift; _ak_ipfs_runner $*; exit;; * ) _ak_usage;; esac else _ak_usage diff --git a/lib/_ak_ipfs b/lib/_ak_ipfs index f2e0629..c2787be 100755 --- a/lib/_ak_ipfs +++ b/lib/_ak_ipfs @@ -34,6 +34,15 @@ function _ak_ipfs(){ fi } +function _ak_ipfs_runner(){ + export IPFS_PATH=$AK_IPFS_REPO; kubo $* + if [ $? -ne 0 ] + then + _ak_log_error "Some error occured when running: kubo $*" + #exit 1 + fi +} + function _ak_ipfs_daemon(){ _ak_ipfs daemon --routing=dht --migrate & printf '%s' "$!" > $AK_WORKDIR/akipfsd.pid |