#!/bin/sh

aux_file_path="$HOME/.faraday/password_changed.txt"

systemctl start python-faraday
sleep 3
if [ ! -f $aux_file_path ]; then
    touch $aux_file_path
    echo "Please, set a new password for the Faraday's default user 'faraday'"
    faraday-manage change-password
    faraday-client --login
else
    faraday-client "$@"
fi
systemctl stop python-faraday
