* Changed config and install options for Restconf
* clixon_restconf daemon is installed in /usr/local/sbin (as clixon_backend), instead of /www-data
* `configure --with-wwwdir=<dir>` remains but only applies to fcgi socket and log
* New option `CLICON_RESTCONF_INSTALL_DIR` is set to where clixon_restconf is installed, with default `/usr/local/sbin/`
* Restconf drop privileges user is defined by `CLICON_RESTCONF_USER`
* `configure --with-wwwuser=<user>` is removed
* clixon_restconf drop of privileges is defined by `CLICON_RESTCONF_PRIVILEGES` option
* New clixon-restconf@2020-05-20.yang revision
* Added: restconf `log-destination`
This commit is contained in:
parent
c3e26b004c
commit
c20c672d83
32 changed files with 410 additions and 221 deletions
|
|
@ -82,11 +82,11 @@ Start clixon backend daemon (if not already started)
|
|||
|
||||
Start clixon restconf daemon
|
||||
```
|
||||
sudo -u www-data -s /www-data/clixon_restconf -f /usr/local/etc/example.xml
|
||||
sudo clixon_restconf -f /usr/local/etc/example.xml
|
||||
```
|
||||
On FreeBSD:
|
||||
```
|
||||
sudo -u www -s /www/clixon_restconf -f /usr/local/etc/example.xml
|
||||
sudo clixon_restconf -f /usr/local/etc/example.xml
|
||||
```
|
||||
|
||||
Make restconf calls with curl (or other http client). Example of writing a new interface specification:
|
||||
|
|
@ -226,7 +226,7 @@ See (https://nchan.io/#eventsource) on more info on how to access an SSE sub end
|
|||
|
||||
Start the restconf fastcgi program with debug flag:
|
||||
```
|
||||
sudo su -c "/www-data/clixon_restconf -D 1 -f /usr/local/etc/example.xml" -s /bin/sh www-data
|
||||
sudo clixon_restconf -D 1 -f /usr/local/etc/example.xml
|
||||
```
|
||||
Look at syslog:
|
||||
```
|
||||
|
|
@ -240,7 +240,7 @@ curl -G http://127.0.0.1/restconf/data/*
|
|||
|
||||
You can also run restconf in a debugger.
|
||||
```
|
||||
sudo gdb /www-data/clixon_restconf
|
||||
sudo gdb clixon_restconf
|
||||
(gdb) run -D 1 -f /usr/local/etc/example.xml
|
||||
```
|
||||
but you need to ensure /www-data/fastcgi_restconf.sock has the following access (may need to be done after restconf has started)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue