aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-09-21 17:45:10 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-09-21 17:45:10 +0300
commit7ca336fe23ffa5a194f1c8316b8d4d6d36615b7e (patch)
treea4c7870e366fdae135ebaf9520926d07be734e8e
parent06a6332567afd1afaac572ad71ef864dd1de6375 (diff)
downloadarching-kaos-tools-7ca336fe23ffa5a194f1c8316b8d4d6d36615b7e.tar.gz
arching-kaos-tools-7ca336fe23ffa5a194f1c8316b8d4d6d36615b7e.tar.bz2
arching-kaos-tools-7ca336fe23ffa5a194f1c8316b8d4d6d36615b7e.zip
Fixed bug in 'ak-zchain --reset'
-rwxr-xr-xlib/_ak_zchain15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/_ak_zchain b/lib/_ak_zchain
index a5203a7..c7b6c2e 100755
--- a/lib/_ak_zchain
+++ b/lib/_ak_zchain
@@ -2,17 +2,18 @@
source $AK_LIBDIR/_ak_log
source $AK_LIBDIR/_ak_ipfs
source $AK_LIBDIR/_ak_zblock
+source $AK_LIBDIR/_ak_script
_ak_zchain_reset(){
- echo "Reseting ZLATEST to ZGENESIS"
- cp $ZGENESIS $ZLATEST
+ echo "Reseting AK_ZLATEST to AK_ZGENESIS"
+ cp $AK_ZGENESIS $AK_ZLATEST
if [ $? != 0 ]; then exit 1; fi
echo "Make sure /zarchive folder exists within IPFS FS"
_ak_ipfs_files_mkdir /zarchive
if [ $? != 0 ]; then echo "Folder already there"; fi
- echo "Archive the previous ZLATEST"
+ echo "Archive the previous AK_ZLATEST"
_ak_ipfs_files_cp /zlatest /zarchive/$(date -u +%s)-$(_ak_ipfs_files_stat /zlatest | head -n 1)
if [ $? != 0 ]; then exit 1; fi
@@ -20,13 +21,13 @@ _ak_zchain_reset(){
_ak_ipfs_files_rm /zlatest
if [ $? != 0 ]; then exit 1; fi
- echo "Copying reset ZLATEST"
- CZLATEST="$(cat $ZLATEST)"
+ echo "Copying reset AK_ZLATEST"
+ CZLATEST="$(cat $AK_ZLATEST)"
_ak_ipfs_files_cp /ipfs/$CZLATEST /zlatest
if [ $? != 0 ]; then exit 1; fi
- echo "Publishing new (reset) ZLATEST"
- _ak_ipfs_name_publish --key=zchain /ipfs/$(cat $ZLATEST)
+ echo "Publishing new (reset) AK_ZLATEST"
+ _ak_ipfs_name_publish --key=zchain /ipfs/$(cat $AK_ZLATEST)
if [ $? != 0 ]; then exit 1; fi
_ak_config_publish