RINSTALL(1)

NAME
rinstall - fetch and install scripts from local or http source

SYNOPSIS
rinstall [-a URL] [-m mode] [-o owner:group] source [target]

DESCRIPTION
rinstall is shipped to remote machines by rset(1) to provide a standard method of installing files made available over HTTP, or from the current working directory for files already staged.

The target must be an absolute path, and is created if it does not exist. If the target exists but is not the same as source, then diff(1) is used to display the difference before it is updated. If the target is omitted, the source is placed in the staging directory defined by the SD environment variable.

If the source is defined absolute path it must exist on a file system on the remote host. If the source is defined with a relative path, then rinstall first checks if the source already exists in the SD and then tries to fetch it from the HTTP resource defined by INSTALL_URL or the -a option.

rinstall always checks for a local copy of the source before attempting to fetch a file from the location defined by the environment variable INSTALL_URL.

The arguments are as follows:

-a  URL to an alternative file location.

-m  Mode to set when a file is updated. This argument is passed to chmod(1).

-o  Owner and/or group to set. This argument is passed to chown(8).

ENVIRONMENT

RINSTALL_DIFF_ARGS
    Arguments for diff(1) tool. The default is "-U 2".

EXIT STATUS
The rinstall utility exits with one of the following values:

0   Target file was installed or updated
1   No changes were made
2   Unknown Operating System
3   Unable to fetch requested file

EXAMPLES
Install configuration file and set permissions

    $SD/rinstall -m 644 -o www:www resolv.conf /var/www/etc/

Fetch latest copy of sources and extract

    $SD/rinstall wodpress.tar.gz
    tar -xzf $SD/wordpress.tar.gz -C /var/www

Fetch a file from an alternative location and store it in the staging directory under tools/sys/ if it's not already there and it's not available at $INSTALL_URL/tools/sys/sometool.tgz

    $SD/rinstall -a https://example.org/files/tool.tar.gz tools/sys/sometool.tgz