{
    "mode": "man",
    "parameter": "update-service",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/update-service/8/json",
    "generated": "2026-06-10T16:23:00Z",
    "synopsis": "update-service --add|--remove service-directory [service-name]\nupdate-service --list|--check [service-name]\nupdate-service --auto|--noauto service-directory",
    "sections": {
        "NAME": {
            "content": "update-service - add/remove a service to/from system-wide service supervision\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "update-service --add|--remove service-directory [service-name]\n\nupdate-service --list|--check [service-name]\n\nupdate-service --auto|--noauto service-directory\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "service-directory  must  be  a  directory to be used by runsv(8), service-name must not start\nwith a dot, and must not contain a slash.\n\nupdate-service adds or removes the service-directory to the system-wide  service  supervision\nprovided  through  runit 's runsvdir(8), lists all registered system-wide services, or checks\nfor a specific service-name whether it is registered.\n\nWhen adding a service, and the service-directory resides in /etc/, update-service makes  sure\nthat  the  ./supervise/ subdirectories in the service-directory, and the optional service-di‐\nrectory/log/, are symbolic links pointing into /var/lib/supervise/, unless they  already  are\nsymbolic links.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--add | -a",
                    "content": "Add  the  service  directory service-directory to the system-wide service supervision,\nunder the name service-name.  If service-name is not  specified,  update-service  will\nuse  the  basename of service-directory.  You can use the sv(8) program to control the\nnewly added service, or query its status, e.g.:\n\n# sv status service-name\n\n",
                    "flag": "-a",
                    "long": "--add"
                },
                {
                    "name": "--remove | -r",
                    "content": "Remove the service directory service-directory, which has been added  under  the  name\nservice-name, from the system-wide service supervision.  If service-name is not speci‐\nfied, update-service will use the basename of service-directory.   When  removing  the\nservice-directory,  the  exit  command  is sent to the corresponding runsv(8) process,\ntelling it to take the service down and exit afterwards.  You can use the  sv(8)  pro‐\ngram to control the removed service, or query its status, e.g.:\n\n# sv status service-directory\n\nWhen the service directory service-directory is removed, the service service-name will\nbe marked as disabled by creating a .service-name symlink.  This  will  prevent  tools\nlike  dhrunit(1)  and  runit-helper from auto-enabling service-name at install or up‐\ngrade of the package that ships service-directory.  The .service-name symlink will  be\nremoved as the service-directory is added again to the system-wide service supervision\nor when the package that ships service-directory is purged.\n\n",
                    "flag": "-r",
                    "long": "--remove"
                },
                {
                    "name": "--list | -l",
                    "content": "If service-name is specified, update-service checks whether service-name is registered\nas system-wide service, prints a message and exits non-zero if not, or prints the ser‐\nvice-name and the directory it points to and exits zero if yes.   If  service-name  is\nnot  specified,  it prints the names of all system-widely registered services, one per\nline.\n",
                    "flag": "-l",
                    "long": "--list"
                },
                {
                    "name": "--check | -c",
                    "content": "The same as --list, but update-service doesn't print anything to standard out or stan‐\ndard error.\n\n",
                    "flag": "-c",
                    "long": "--check"
                },
                {
                    "name": "--auto | -u",
                    "content": "Remove  the  down  file,  if any, from the directory service-directory.  This way, the\nservice represented by the service-directory will be started and monitored as soon  as\na  runsv  process  is  started for that directory; the requested status of the service\nwill be 'up'.  This is the default.  If service-name is  given,  will  be  ignored  as\n--auto  directly act on the service-directory and thus only takes service-directory as\nargument.\n",
                    "flag": "-u",
                    "long": "--auto"
                },
                {
                    "name": "--noauto | -n",
                    "content": "Touch a down file into the service-directory.  This way  the  service  represented  by\nservice-directory  will  not  be automatically started when a runsv process is started\nfor that directory.  The requested status of the service will be  'down'.   A  service\nset  to  --noauto  does  not start automatically at boot or when a runsvchdir(8) takes\nplace, but can still be started using the sv(8) program, e.g.:\n\n# sv up service-name\n\nIf service-name is given, will be ignored as --noauto directly act on the  service-di‐\nrectory and thus only takes service-directory as argument.\n\n",
                    "flag": "-n",
                    "long": "--noauto"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "SVDIR  The  environment  variable  $SVDIR  overrides the default services directory /etc/ser‐\nvice/.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/service/\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sv(8), runsv(8), runsvdir(8)\n\nhttp://smarden.org/runit/\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Gerrit Pape <pape@smarden.org>\n\n\n\nupdate-service(8)",
            "subsections": []
        }
    },
    "summary": "update-service - add/remove a service to/from system-wide service supervision",
    "flags": [
        {
            "flag": "-a",
            "long": "--add",
            "arg": null,
            "description": "Add the service directory service-directory to the system-wide service supervision, under the name service-name. If service-name is not specified, update-service will use the basename of service-directory. You can use the sv(8) program to control the newly added service, or query its status, e.g.: # sv status service-name"
        },
        {
            "flag": "-r",
            "long": "--remove",
            "arg": null,
            "description": "Remove the service directory service-directory, which has been added under the name service-name, from the system-wide service supervision. If service-name is not speci‐ fied, update-service will use the basename of service-directory. When removing the service-directory, the exit command is sent to the corresponding runsv(8) process, telling it to take the service down and exit afterwards. You can use the sv(8) pro‐ gram to control the removed service, or query its status, e.g.: # sv status service-directory When the service directory service-directory is removed, the service service-name will be marked as disabled by creating a .service-name symlink. This will prevent tools like dhrunit(1) and runit-helper from auto-enabling service-name at install or up‐ grade of the package that ships service-directory. The .service-name symlink will be removed as the service-directory is added again to the system-wide service supervision or when the package that ships service-directory is purged."
        },
        {
            "flag": "-l",
            "long": "--list",
            "arg": null,
            "description": "If service-name is specified, update-service checks whether service-name is registered as system-wide service, prints a message and exits non-zero if not, or prints the ser‐ vice-name and the directory it points to and exits zero if yes. If service-name is not specified, it prints the names of all system-widely registered services, one per line."
        },
        {
            "flag": "-c",
            "long": "--check",
            "arg": null,
            "description": "The same as --list, but update-service doesn't print anything to standard out or stan‐ dard error."
        },
        {
            "flag": "-u",
            "long": "--auto",
            "arg": null,
            "description": "Remove the down file, if any, from the directory service-directory. This way, the service represented by the service-directory will be started and monitored as soon as a runsv process is started for that directory; the requested status of the service will be 'up'. This is the default. If service-name is given, will be ignored as --auto directly act on the service-directory and thus only takes service-directory as argument."
        },
        {
            "flag": "-n",
            "long": "--noauto",
            "arg": null,
            "description": "Touch a down file into the service-directory. This way the service represented by service-directory will not be automatically started when a runsv process is started for that directory. The requested status of the service will be 'down'. A service set to --noauto does not start automatically at boot or when a runsvchdir(8) takes place, but can still be started using the sv(8) program, e.g.: # sv up service-name If service-name is given, will be ignored as --noauto directly act on the service-di‐ rectory and thus only takes service-directory as argument."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "sv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sv/8/json"
        },
        {
            "name": "runsv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsv/8/json"
        },
        {
            "name": "runsvdir",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsvdir/8/json"
        }
    ]
}