0

I use this script for update my repo slackware(generate asc,txt,etc)

http://slackware.org.uk/people/alien/tools/gen_repos_files.sh

I have "automated" it with my expect script

#!/bin/bash
set -e

funct()
{
#script update repo http
pass3="proot"

    expect -c "
    spawn /usr/local/bin/gen_repos_files.sh -l /tmp/changelog
    expect \"Enter your GPG passphrase:  \"
    send \"$pass3\n\"
    interact
    "

find /srv/httpd/htdocs/repos/slackware-mg/ -type f |xargs chmod 644  -v

}

while inotifywait -qqre modify /http/srv/httpd/htdocs/repos/slackware-mg; do funct; done

Works perfect,but only if i launch it from a shell,if i run it,from rc.local or crontab..it doen't work,the second script(gen_repos.sh) remain sleeping. Why?

1

1 Answer 1

1

Solution found,nohup.

For example

nohup /usr/local/bin/aggiornailrepo.sh&

On rc.local

And don't forget -o /dev/null on inotifywait otherwise won't work without a shell

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .