diff --git a/linux/debian/essentials/config b/linux/debian/essentials/config index 073608849e02f685b6290fa8ba65c91b91217e94..b48c83ad006cb79d84a637a68ad752e06fd99afa 100755 --- a/linux/debian/essentials/config +++ b/linux/debian/essentials/config @@ -62,6 +62,14 @@ reconfigure|configure) db_go || true fi + db_input critical cellframe-node/backbone_enabled || true + db_go || true + + db_get cellframe-node/backbone_enabled + if [ "$RET" = "true" ]; then + db_input critical cellframe-node/backbone_node_type || true + db_go || true + fi ;; *) echo "config called with unknown argument \`$1'" >&2 diff --git a/linux/debian/essentials/postinst b/linux/debian/essentials/postinst index d8b0c5092f9079482f748f2a13443afd3a34e141..5d8a21e050cb978250cea044a56546558070194f 100755 --- a/linux/debian/essentials/postinst +++ b/linux/debian/essentials/postinst @@ -147,6 +147,27 @@ if [ "$RET" = "true" ]; then echo "[*] Enabled subzero" fi +# Init Backbone +NET_NAME="Backbone" + +db_get cellframe-node/backbone_enabled || true +if [ "$RET" = "true" ]; then + DAP_CFG_NET="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + DAP_CFG_NET_TPL="$DAP_PREFIX/share/configs/network/$NET_NAME.cfg.tpl" + DAP_NET_CFG="" + if [ -e "$DAP_CFG_NET" ]; then + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg.dpkg-new" + else + DAP_NET_CFG="$DAP_PREFIX/etc/network/$NET_NAME.cfg" + fi + + cat $DAP_CFG_NET_TPL > $DAP_NET_CFG || true + db_get cellframe-node/backbone_node_type || true + NODE_TYPE=$RET + sed -i "s/{NODE_TYPE}/$NODE_TYPE/g" $DAP_NET_CFG || true + echo "[*] Enabled Backbone" +fi + mkdir -p $DAP_PREFIX/var/log || true mkdir -p $DAP_PREFIX/var/plugins || true diff --git a/linux/debian/essentials/templates b/linux/debian/essentials/templates index 04ac4130b29cf0f28d671f4b2fac31bdcf270446..b95dd06b05ded0e2fa541050d709110af9973306 100755 --- a/linux/debian/essentials/templates +++ b/linux/debian/essentials/templates @@ -118,4 +118,23 @@ Description: Kelvpn Minkowski: Node role full - sync all its cell master - allow to store values in chains and take comission, sync all shards that will need to be synced archive - Sync all the network - root - Special predefined root nodes, usualy produces zerochain and act like archive as well + root - Special predefined root nodes, usualy produces zerochain and act like archive as well + +Template: cellframe-node/backbone_enabled +Default: true +Choices: true, false +Type: select +Description: Backbone: Enable network + Subzero Testnet: Enable network auto load on start + +Template: cellframe-node/backbone_node_type +Type: select +Default: full +Choices: full, light, master, archive, root +Description: Backbone: Node role + Select node role:. + Light - syncronize only local wallets + full - sync all its cell + master - allow to store values in chains and take comission, sync all shards that will need to be synced + archive - Sync all the network + root - Special predefined root nodes, usualy produces zerochain and act like archive as well