#!/bin/sh -e SKY_DIR=/var/lib/skytable systemctl daemon-reload echo "Doing '$1'" if [ "$1" = "configure" ]; then # Enable and start skyd on fresh install systemctl enable skyd systemctl start skyd echo "Generating password and configuration" if [ -f /var/lib/skytable/config.yaml ]; then echo "Configuration already exists. Not updating configuration." else mv /var/lib/skytable/config.yaml.tmp /var/lib/skytable/config.yaml # Generate and set password if [ ! -f "$SKY_DIR/config.yaml" ]; then echo "Error: The file $SKY_DIR/config.yaml does not exist." exit 1 # Exit with an error code fi PASSWORD=$(tr -dc A-Za-z0-9