News for hackers. Stuff that matters.
Re:Systemd v227 by simoncion on Thursday October 08, 2015 @07:06PM (#10357010)
Assuming you want all configuration in the init script, [0] here's the OpenRC equivalent. The USER/ENV/WKDIR variables are there for legibility.

  #!/sbin/runscript
  
  USER="--user nobody --group nobody"
  ENV="--env PATH=/usr/bin:/usr/local/bin --env NODE_ENV=production"
  WKDIR="--chdir /var/www/blah"
  
  description="Blah app"
  command="/var/www/blah/bin/www"
  start_stop_daemon_args="$USER $ENV $WKDIR"
Assuming you had a "multi-user" runlevel on your system and the service was named "blah", you would do the following to add that service to it:

  rc-update add blah multi-user
But, the "default" runlevel is probably the equivalent to systemd's multi-user runlevel. So:

  rc-update add blah default
Describe works as expected:

  $ /etc/init.d/blah describe
   * Blah app
[0] Real init scripts make use of OpenRC's machinery for processing config files in /etc/conf.d

There are no comments on this comment yet.