Arc Forumnew | comments | leaders | submitlogin
1 point by tvvocold 3697 days ago | link | parent

sure,then?


1 point by akkartik 3696 days ago | link

First create a way to have arc automatically run (nsv) on startup. Then you can say this (assuming your shell is bash):

  $ while true; do arc server.arc; done
Now anytime your server dies it'll just come back up.

-----

3 points by akkartik 3695 days ago | link

I've updated the repository to make this easier. There's now a script called run-news to bring up the HN server.

  $ git pull
Now you should be able to run your server in a loop like this:

  $ while true; do ./run-news; sleep 5; done
Let me know if you run into trouble with this. I'll be around and more responsive for the next few days.

More notes, just for future reference:

1. run-news provides an interactive prompt, so you can make changes to the server without needing to restart it. Just remember to also modify news.arc otherwise your changes will be lost when the server dies next.

2. The sleep above is to help exit the server. If you quit the server as usual it'll just come up again. To bring it down, hit ctrl-c twice in succession.

3. I also fixed up the readme, which was abysmally out of date. Sorry about that.

-----

1 point by tvvocold 3693 days ago | link

thx,cool!

btw,i use https://github.com/shader/arc-openshift for openshift env,(not the https://github.com/arclanguage/anarki) how could i update it?

-----

1 point by akkartik 3692 days ago | link

arc-openshift installs anarki: https://github.com/shader/arc-openshift/blob/fa9def061/.open...

Just cd into the arc directory ($OPENSHIFT_DATA_DIR/arc, but I'm not sure how to deduce OPENSHIFT_DATA_DIR) and run:

  $ git pull

-----

1 point by tvvocold 3692 days ago | link

when i git pull i got

  error: Your local changes to the following files would be overwritten by merge:
    lib/news.arc
  Please, commit your changes or stash them before you can merge.
  Aborting

-----

1 point by akkartik 3692 days ago | link

Have you made any changes to news.arc? Mail me the output of this command, and I'll help you with the merge.

  $ git diff lib/news.arc

-----