Git Product home page Git Product logo

prerender-daemon's Introduction

prerender-daemon

This repository will help you to install/uninstall prerender as a system services on a linux machine using System V init scripts.

By using this installer you will be able to start/stop a prerender instance as service (daemon):

sudo service prerender start|stop|restart

Install

The installer assumes you've already installed node.js, npm

Just clone the repository with

git clone https://github.com/lmammino/prerender-daemon.git

Then run

sudo prerender-daemon/install.sh

Install script running example image

and it will do all the following hard work for you:

  • Install prerender as global package
  • Creates a dedicate prerender user that will be used to run the daemon
  • Adds an init script to start the daemon
  • Starts the daemon

The installation command support few parameters:

  • -h or --help: Display the help
  • -v or --verbose: more verbose output
  • -u or --uninstall: Act as an unistaller removing prerender-daemon
  • -p or --node-prefix: specify a custom node prefix (eg. "/usr")
  • -s or --server-script: specify a custom server script that will be used to replace the default launch script (eg. to provide a custom configuration)

Advanced configuration

If you want to provide a custom script to run your prerender server (with custom configuration variables and plugins) you can use a custom server.js file (you have an example on config/server.js.dist) and pass its path as --server-script parameter to the installer script. This file will be copied and substituted to the default server.js script in your node_modules folder.

Uninstall

Just run

sudo prerender-daemon/install.sh --uninstall

To clean up everything that has been installed previously

License

This code is distributed under the MIT license. Please refer to the LICENSE file to read the full version.

Contributions are always (and really) appreciated ๐Ÿ˜‰

prerender-daemon's People

Contributors

hounddog avatar lmammino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

prerender-daemon's Issues

Logging of console output

hey @lmammino, thanks for this easy to use install script!

Just one question: is it possible to write the log messages to a log file?

Cheers, Daniel

Creates a new process on each start

I am currently investigating on our server that each time we run

service prerender start

It starts a new process even if one is already running.
I am trying to figure out currently how to solve this.

Prerender service not started

Hey,
I've installed the service as written in the info message: here is the log output. This seems okay for me. I changed the file /etc/init.d/prerender file as follows to output the log as shown here . But there seems to be nothing happening. There is no process started, no error output on the console or in the prerender log. I'm out of options! Can you help?

Sorry, forgot to mention that I'm on Ubuntu 14.04.3 LTS.

Daniel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.