Last active
February 19, 2018 17:27
-
-
Save battis/25dd7c704310e644c147f06041e5e7e5 to your computer and use it in GitHub Desktop.
Start TT-RSS daemon in a detached screen (a 'cheap daemon' on multiuser servers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/expect -f | |
set screen "tt-rss" | |
set prompt "$" | |
set ttrss "~/public_html/tt-rss" | |
# open a new screen (reusing any existing 'tt-rss' screen) | |
spawn screen -D -R "$screen" | |
expect "$prompt" | |
# start the tt-rss multithreaded daemon script | |
send "php $ttrss/update_daemon2.php\n" | |
# detach from the 'tt-rss' screen (\x01 == ctrl-A) | |
expect "All done." | |
send "\x01" | |
send "d" | |
interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One could, of course, instead use
nohup
:The downside of this approach is that you can't examine the output at will as it is running. (And, if redirected to a log file, it would then turn into a log-rotation issue. Blergh.)