2
1

peertube 612 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # PROVIDE: peertube
  3. # REQUIRE: LOGIN postgresql nginx redis
  4. # KEYWORD: shutdown
  5. PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin"
  6. . /etc/rc.subr
  7. desc="Peertube daemon"
  8. name=peertube
  9. rcvar=peertube_enable
  10. load_rc_config $name
  11. : ${peertube_enable:=NO}
  12. sig_stop=-KILL
  13. peertube_chdir="/var/www/peertube/peertube-latest"
  14. peertube_env="HOME=/var/www/peertube \
  15. NODE_ENV=production \
  16. NODE_CONFIG_DIR=/var/www/peertube/config \
  17. USER=peertube"
  18. peertube_user=peertube
  19. command="/usr/local/bin/node"
  20. command_args="dist/server >> /var/log/peertube/${name}.log 2>&1 &"
  21. run_rc_command "$1"