jamesrwhite / minicron

🕰️ Monitor your cron jobs
GNU General Public License v3.0
2.34k stars 154 forks source link

Authentication error occurred when saving a job's settings #141

Closed Huron closed 9 years ago

Huron commented 9 years ago

image

I get this error when I try to save job settings. The attempt of connection to the host from the console succeeds with same ssh key.

P.S. And add new job too...

I've got a case for reproducing the error. When I launch minicron from command line by command minicron server start it works normally. If I launch it by the init script I've got error when try to make any changes.

#!/bin/bash

PID=/var/run/minicron.pid
BIN=/usr/local/bin/minicron

case "$1" in
    start)
        start-stop-daemon --start --pidfile $PID --exec $BIN -- server start
    ;;
    stop)
        $BIN server stop
    ;;
    restart)
        $0 stop
        sleep 3
        $0 start
    ;;
esac
Huron commented 9 years ago

I've solved my issue.

#!/bin/bash

PID=/var/run/minicron.pid
BIN=/usr/local/bin/minicron
HOME=/root

case "$1" in
    start)
        start-stop-daemon --start --pidfile $PID --exec $BIN --chdir $HOME -- server start
    ;;
    stop)
        $BIN server stop
    ;;
    restart)
        $0 stop
        sleep 3
        $0 start
    ;;
esac
jamesrwhite commented 9 years ago

Ah, I guess without $HOME it wasn't able to locate the SSH keys as I'm using ~ in the path to them.

I'm planning to move the SSH keys from being stored on the file system soon though (https://github.com/jamesrwhite/minicron/issues/124), thanks for the detailed explanation :+1: