ipsvce

ipsvce

IPSVCE is the Fip HTTP demon that allows a user running Netscape or Internet
Explorer to manage the Fip system.

To access when running, type in theLocation field of the browser :
    http://(hostname of the Fip box):9090

On Unix,IPSVCE can also be used in batch mode typically to start and stop
processes on startup or for maintenance via crontab.
  - for example during the nightly maintenance,
    you may wish to stop certain processes, cleanup some files and restart.

On NT however IPSVCE is hidden so to start and stop processes WITHOUT using a
browser :
    use 'ipnt -k(name)' and 'ipnt -a(name)'.

Note that for NT, IPSVCE runs as an NT Service which automatically starts on
reboot.
In this case it also zaps all files in the temporary area '/fip/x' - SYSTEM,
TMP*, SFFTMP*, SYN* and FORM*.
On NT IPSVCE can NOT be run manually from a command prompt UNLESS the -S and -X
switches are supplied - in this case 'x' is left alone.

Input parameters on startup are
    -h : hostname for IP address        default: hostname
        Use this to use an alternate ethernet card in your
        system which is NOT the main boot address.
    -t : the auto check time            default: 60 sec
    -P : port number for the server         default: 9090
    -S : do NOT check for status every 60 secs  default: do
    -C : Use the Cookie not the IP address      default: IP address
        Some firewalls destroy/change the IP address. Use this to
        track using Cookies instead.
    -v : print the version no and quit
--UNIX only--
    -u : start all programs under this logon    default: that of user
    -a : start this name/group/program/all      default: no
    -l : start this name/group/program/all then start the local group
                            default: no
    -k : stop  this name/group/program/all      default: no
--WINNT only--
    -d : NT drive for /fip              def: drive started from
    -X : Testing - do NOT start as a service    def: normal running
    To start and stop name/group/programs on NT, use 'ipnt'

----------------------------
Installation/running........

    1. Sort out the parameter files below
    2. add yourself a logon
    3. Install programs as per below

IPSVCE uses the following files :
    1. fix/SYSTEM.fiplick.(full host.domain name)
        contact Fippes for your own licence number

    2. tables/sys/SVCE.SYSTEM.(SHORT-HOSTNAME)
        eg if your hostname is
            rinky.dink.bongo.org
        the parameter file is SVCE.SYSTEM.RINKY
        see below for valid keywords.

    3. tables/sys/SYSTEM (and the running version in 'x')
        This is the SAME file as used by the commandline program 'ip' or 'ipnt'

    4. tables/sys/SVCE.LOGON
        for a list of valid logons of thse people who will use IPSVE from a browser

    5. a number of template HTML stub files in tables/svce

---- LOGON file has structure
    logon (tabs/spc) passwd (tab/spc) level (tab/spc) Topframe (eoln)
        no spaces or tabs in logon and passwd
        level is numeric 0-9999
            You must be > 100 to run ADMIN programs
        Topframe is the stub as 'top' in /fip/tables/svce/top.html
            This is the first page to be displayed.
        case is important for each parameter !
        Use a different Topframe to restrict/allow access to various parts of the
system

---- SVCE.SYSTEM.(hostname) - Main Param file - has the syntax :

    ;comment line
    company: (FipSeq Text)      (eoln)
        This will be displayed on each page as a title

    defallow: (y/n)         (eoln)
        The default is to allow all and any logon to connect and logon
            - use 'disallow' to block certain IP addresses.
        If you use 'defallow'no' then the default is NO access unless
            specifically mentioned in an 'allow'.
    allow:(ip address)      (eoln)
        Allow this IP address to logon
        There can be up to 100 allows and disallows.
    disallow:(ip address)       (eoln)
        Do NOT allow this IP address to logon.

    startup: (a/k prog/group/ALL)   (eoln)
        Start (a) or stop (k) the following names/groups/programs at Startup.
        These are valid in the system file.
        If you have NO startup, nothing will be started on reboot.
        You are advised to have something there.
        There is also a 'd' command which delays a number of seconds (1<=d<=60)
        startup:d 10

    htmlchr:(Incoming chr) (spaces/tabs) (Outgoing chr) (eoln)
    or
    htmlchr:(Incoming chr) (spaces/tabs) (Outgoing string)  (eoln)
    timeout: No of seconds to wait before timeing out a logon
        The default is one hour (3600 secs).
        Set to Zero for NO automatic logout.
        Note that Log Ticker will refresh this automatically
        and will never be logged-off.

    hostname-to-use:(hostname)
    ipaddress-to-use:(ipaddress)
        Use either of these to overrule the -h (name) or the
        default hostname where you want to be looking
        down a specific ethernet card rather than the default.
Example :
;
; Publication/Company Banner
company:Per Arne's rinky dink browser thingy

;
; Either allow everyone AND disable the bad ones ....
;;defallow:N
; Disallow a couple of hosts
;;disallow:183.243.241.141
;;disallow:183.243.241.134

; Or DISable by default and allow only where specified
defallow:y
allow:183.243.241.140
allow:183.243.241.137

;
; Start/stop The following SYSTEM groups/programs at Startup.....
;
startup:    awheel
startup:    arun
;;startup:  k2net

htmlchr:(Incoming chr) (spaces/tabs) (Outgoing chr) (eoln)
or
htmlchr:(Incoming chr) (spaces/tabs) (Outgoing string)  (eoln)

where the two chrs can be printable chrs or escaped octal.
Eg
htmlchr:\245    a
htmlchr:a   A
htmlchr:b   B
htmlchr:\377    \376
htmlchr:\003    \256qr\257

If the file has a FipStyle header between '~ NL', any '~' and NL chrs are
preserved but any other are translated.

Parameter files in tables/svce are stubs of HTML.

Most actions required a '*.top' and a '*.end' if the data is NOT already in
HTML format.

Queues and Show.status (stat) also need a '*.line'.

The following FipHdr fields are used in the HTML templates :
    ZC - Company or Publication Name - as in the 'company' keyword in 
tables/sys/SVCE.SYSTEM.(hostname)
    ZE - error msg for this action (in FipSeq).
    ZF - error msg if file NOT found for show/dir etc
    ZH - host IP address
    ZJ - hostname
    ZK - Logon Cookie key
    ZL - an entry line in a browse (usually a filename)
    ZM - Heading
    ZN - filename for show
    ZO - options - just a big buffer that can be added anywhere and is 'top'
dependent eg do_woops woops.top = <OPTION VALUE="dest1">Dest1
    ZP - port
    ZQ - Queue name in a browse
    ZS - seek position in page
    ZR - Search (ifany) for page
    ZT - HTML for a Ticker (show log and resend)
    ZY - ticker time - default 60 secs
    ZZ - minor subparam used for various things - show no of lines for do_dir, msg
for Block

    SS - Stat - Current Status
    SN - Stat - name
    SG - Stat - group
    SP - Stat - program
    SO - Stat - opposite action ie Kill if Running, Activate if killed

-------------------------------------------------------------------------------
Sundry notes
1. SCAN and MONITOR
For Scan or Monitor, the default files are SCANSVCE and MONSVCE in tables/sys.
If you want to use different parameter files, then find them in the
tables/svce/fipuser.html (or equivalent) :
    <OPTION VALUE="q&scan">Run the Queue Scanner
    <OPTION VALUE="q&monitor">Run the File Monitor

For monitor - to use a parameter file MONOINKY :
    <OPTION VALUE="q&monitor=monoinky">Run the File Monitor

-------------------------------------------------------------------------------
Installation On UNIX ..............

Installation is normally part of the checklist that comes with you install kit.

Generally on a new install, run 'ipmgr' to create and copy templates BEFORE
doing the following.

You will then need to make sure ipsvce runs as a demon

 Unix : run ipsvce :
        ipsvce &        to use the default port 9090
    or  ipsvce -P 9091 &    to define a specific port

Normally this will be the last section of the startup script 'local/rc.commgr'
which is then started by S99fip in /etc/rc3.d or /etc/inittab or /etc/rc.local
depending on your operating system.

Note that for normal running Fip uses EITHER 'ip -d' OR 'ipsvce' as the Fip
Control Daemon - which is what is started in 'rc.commgr'.

IF YOU ELECT TO USE 'IP' as this checker daemon AND you also want to run
'ipsvce', pls start 'ipsvce' with the '-S' input switch so the checks are not
duplicated as they MAY conflict!

-------------------------------------------------------------------------------
Installation On Windows NT ..............

Installation is normally part of the checklist that comes with you install kit.

Generally on a new install, run 'ipmgr' to create and copy templates BEFORE
doing the following.

IPSVCE acts as the NT Service for Fip.

Note that 'ipsvce' REPLACES 'ipntsvce'. Before installing you MUST REMOVE
IPNTSVCE IF IT EXISTS.

To Install :
    - Check Control Panel/Services that "Fip Comms Manager" does NOT exist
        - if it does, REMOVE as per below.
    - Change to the correct drive/queue for Fip programs
        Cmd>f:
        Cmd>cd \fip\bin
    - Install the service with
            Cmd>ipsvce -install
            If there is NO message back to say that Fip Comms Mgr installed ccorrectely,
Check the Event viewer for the reason why
    - Check Control Panel/Services that "Fip Comms Manager" exists
        - start it.
        - you may also wish to make it AUTOMATICALLY start on reboot at this point.

To Remove :
    - Check Control Panel/Services that "Fip Comms Manager" is NOT running
        - if it is STOP that Service.
    - Change to the correct drive/queue for Fip programs
        Cmd>f:
        Cmd>cd \fip\bin
    - Remove the service with
            Cmd>ipsvce -remove
    - NOTE YOU WILL NOT BE ABLE TO STOP AND START ANYTHING ONCE THIS HAS BEEN
DONE.

To Upgrade :
    - Check Control Panel/Services that "Fip Comms Manager" is NOT running
        - if it is STOP that Service.
    - Change to the correct drive/queue for Fip programs
        Cmd>f:
        Cmd>cd \fip\bin
    - Stop and REMOVE (as above) IPSVCE if it is running.
    - Copy new programs into \fip\bin.
    - Install as above

To start and stop processes WITHOUT using a browser - for example for the
nightly maintenance - use 'ipnt -k(name)' and 'ipnt -a(name)'.

(copyright) 2017 and previous years FingerPost Ltd.