logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

gnunet-9999.initd (643B)


  1. #!/sbin/runscript
  2. # Copyright 1999-2013 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. need net
  6. }
  7. start() {
  8. if ! test -f "/etc/gnunetd.conf"; then
  9. eerror "You must create /etc/gnunetd.conf file first"
  10. return 1
  11. fi
  12. ebegin "Starting GNUnet"
  13. # -u username, -c path to gnunet.conf file
  14. start-stop-daemon --start --quiet --background --exec /usr/bin/gnunetd \
  15. -- -u gnunetd -c /etc/gnunetd.conf
  16. eend $? "Failed to start GNUnet"
  17. }
  18. stop() {
  19. ebegin "Stopping GNUnet"
  20. killall gnunetd
  21. eend $? "Failed to stop GNUnet"
  22. }
  23. restart() {
  24. svc_stop
  25. sleep 3
  26. svc_start
  27. }