diff options
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | doc/snac.8 | 2 | ||||
| -rw-r--r-- | examples/snac_freebsd | 19 |
3 files changed, 26 insertions, 1 deletions
| @@ -40,6 +40,12 @@ On OpenBSD you just need to install `curl`: | |||
| 40 | pkg_add curl | 40 | pkg_add curl |
| 41 | ``` | 41 | ``` |
| 42 | 42 | ||
| 43 | On FreeBSD, to install `curl` just type: | ||
| 44 | |||
| 45 | ```sh | ||
| 46 | pkg install curl | ||
| 47 | ``` | ||
| 48 | |||
| 43 | The source code is available [here](https://comam.es/what-is-snac). | 49 | The source code is available [here](https://comam.es/what-is-snac). |
| 44 | 50 | ||
| 45 | Run `make` and then `make install` as root. | 51 | Run `make` and then `make install` as root. |
| @@ -76,7 +76,7 @@ level by editing the 'dbglevel' field in the | |||
| 76 | file or by setting a numeric value between 0 and 3 to the DEBUG | 76 | file or by setting a numeric value between 0 and 3 to the DEBUG |
| 77 | environment variable, see below. | 77 | environment variable, see below. |
| 78 | .Pp | 78 | .Pp |
| 79 | If you operate a Linux systemd-enabled system or OpenBSD, there are | 79 | If you operate a Linux systemd-enabled system, OpenBSD or FreeBSD, there are |
| 80 | startup scripts and configuration data in the | 80 | startup scripts and configuration data in the |
| 81 | .Pa examples | 81 | .Pa examples |
| 82 | directory. | 82 | directory. |
diff --git a/examples/snac_freebsd b/examples/snac_freebsd new file mode 100644 index 0000000..d908b6e --- /dev/null +++ b/examples/snac_freebsd | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # PROVIDE: snac | ||
| 2 | # REQUIRE: DAEMON | ||
| 3 | # KEYWORD: shutdown | ||
| 4 | |||
| 5 | . /etc/rc.subr | ||
| 6 | |||
| 7 | name="snac" | ||
| 8 | rcvar=snac_enable | ||
| 9 | |||
| 10 | load_rc_config $name | ||
| 11 | |||
| 12 | : ${snac_enable:=NO} | ||
| 13 | : ${snac_user:="snac"} | ||
| 14 | : ${snac_args:="httpd SNAC_DATA_PATH"} | ||
| 15 | |||
| 16 | command="/usr/local/bin/snac" | ||
| 17 | command_args="${snac_args} > /var/log/snac.log 2>&1 &" | ||
| 18 | |||
| 19 | run_rc_command "$1" \ No newline at end of file | ||