Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
config:env [2013/09/26 15:35] – [SBBSNODE] digital manconfig:env [2018/02/28 16:48] – [bash/sh] Mention /etc/profile and sudo -E digital man
Line 45: Line 45:
 (replace ''/sbbs/ctrl'' with the full path to your ''[[dir:ctrl]]'' directory) (replace ''/sbbs/ctrl'' with the full path to your ''[[dir:ctrl]]'' directory)
  
 +=== /etc/profile ===
 +In Debian and Debian-based Linux distributions (e.g. Ubuntu), you can also set environment variables in your ''/etc/profile'' file, like so:
 +
 +  export SBBSCTRL=/sbbs/ctrl
 +
 +=== sudo ===
 +When using the ''sudo'' command to execute a Synchronet program with elevated (e.g. root) privileges, you may need to pass the ''-E'' option to preserve the environment variables set the parent shell:
 +
 +  sudo -E sbbs
 + 
 ==== csh/tcsh ==== ==== csh/tcsh ====
  
Line 54: Line 64:
     setenv SBBSCTRL /sbbs/ctrl     setenv SBBSCTRL /sbbs/ctrl
 (replace ''/sbbs/ctrl'' with the full path to your ''[[dir:ctrl]]'' directory) (replace ''/sbbs/ctrl'' with the full path to your ''[[dir:ctrl]]'' directory)
 +
 +
 +===== Automatic ===== 
 +
 +When the Synchronet [[server:Terminal]] Server executes an external program (e.g. door game, OS command shell, timed events, file transfer protocol drivers, etc.), it will set the following environment variables for the child process to utilize:
 +
 +^ Variable Name ^ Description                                   ^ Example ^
 +| ''DSZLOG''    | Path to the current protocol driver log file  | ''c:\sbbs\node1\protocol.log'' |
 +| ''SBBSNODE''  | Path to the current node directory            | ''c:\sbbs\node1\'' |
 +| ''SBBSCTRL''  | Path to the Synchronet [[dir:ctrl]] directory | ''c:\sbbs\ctrl\'' |
 +| ''SBBSDATA''  | Path to the Synchronet [[dir:data]] directory | ''c:\sbbs\data\'' |
 +| ''SBBSEXEC''  | Path to the Synchronet [[dir:exec]] directory | ''c:\sbbs\exec\'' |
 +| ''SBBSNNUM''  | Current node number                           | ''1'' |
 +| ''PCBNODE''   | Current node number (only for DOS programs)   | ''1'' |
 +| ''DAY''       | Current day of the month (01-31             | ''01'' |
 +| ''WEEKDAY''   | Current day of the week abbreviation          | ''Mon''|
 +| ''MONTHNAME'' | Current month name abbreviation               | ''Jan''|
 +| ''MONTH''     | Current month number (01-12)                  | ''01'' |
 +| ''YEAR''      | Current year                                  | ''2017'' |
 +
 +These variables can be used by shell scripts, batch files and programs, as needed.
 +