You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
783 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2014-2018 OpenWrt.org
  3. START=94
  4. USE_PROCD=1
  5. # If an unpriviledged user is selected, make sure that next two
  6. # files are writable by that user:
  7. PIDFILE="/var/run/smsd.pid"
  8. INFOFILE="/var/run/smsd.working"
  9. DAEMON=/usr/bin/smsd
  10. # Set/edit this before starting service !!!!!
  11. WRT_SPOOL=/var/spool
  12. start_service() {
  13. echo "Creating minimum spool directories"
  14. mkdir -p $WRT_SPOOL
  15. mkdir -p $WRT_SPOOL/sms
  16. mkdir -p $WRT_SPOOL/sms/incoming
  17. mkdir -p $WRT_SPOOL/sms/outgoing
  18. mkdir -p $WRT_SPOOL/sms/checked
  19. mkdir -p $WRT_SPOOL/sms/failed
  20. mkdir -p $WRT_SPOOL/sms/sent
  21. procd_open_instance
  22. procd_set_param command $DAEMON -t -n MAINPROCESS -p$PIDFILE -i$INFOFILE
  23. procd_set_param respawn
  24. procd_set_param stdout 1
  25. procd_close_instance
  26. }