ddworken / hishtory

Your shell history: synced, queryable, and in context

Home Page:https://hishtory.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Silent Init Possible?

undaunt opened this issue · comments

Hello,

I'm wondering if it is possible to auto-confirm an init command as part of a bash script. I'd like to run this on startup on Unraid and it appears the init command requires user interaction in all cases to confirm Y or N. Is it possible to work around this somehow?

Thanks!

Script in progress below:

#!/bin/bash
YOUR_HISHTORY_SECRET=xxxxx

# Install Hishtory
curl https://hishtory.dev/install.py | python3 -

# Set the server host
echo 'export HISHTORY_SERVER=http://10.0.20.15:8095' >> /root/.bashrc

# Source bashrc
source /root/.bashrc

# Init the server with secret key
hishtory init $YOUR_HISHTORY_SECRET

Thanks for filing this! This is now possible via the --force flag (e.g. hishtory init --force $YOUR_HISHTORY_SECRET.

Awesome, thanks!