{
    "mode": "man",
    "parameter": "cpsv",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/cpsv/8/json",
    "generated": "2026-10-08T14:21:33Z",
    "synopsis": "cpsv  [-f] a <service-name> ...\ncpsv  p <service-name>\ncpsv  d <service-name>\ncpsv  [-f] s\ncpsv  l",
    "sections": {
        "NAME": {
            "content": "cpsv - utility to install and manage runit services\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cpsv  [-f] a <service-name> ...\ncpsv  p <service-name>\ncpsv  d <service-name>\ncpsv  [-f] s\ncpsv  l\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "cpsv  is  a tool to install runscripts from CPSVSOURCE to CPSVDEST.  It can also be used to\nmanage runscripts that are already installed in CPSVDEST.\nIn a Debian system, CPSVSOURCE is /usr/share/runit/sv.src and CPSVDEST is /etc/sv;  by  de‐\nfault /usr/share/runit/sv.src is a symlink that points to /usr/share/runit/sv.\nTraditionally  runscripts are installed in /etc/sv/ but it's also possible to have runscripts\ninstalled in /usr/share/runit/sv/; when the latter is true, /etc/sv/ becomes reserved  for  a\nlocally modified copy of the service.\n\n",
            "subsections": []
        },
        "COMMANDS": {
            "content": "a      Copy  <service>  from  CPSVSOURCE  into CPSVDEST, then create symlinks as when the p\ncommand is used; more than one <service> name can be given with this command and  each\n<service> directory must exists in CPSVSOURCE.\nIf  <service> already exists in CPSVDEST, cpsv prints a warning, the cp invocation is\nskipped and the return code is increased by one. The -f option can be used  to  change\nthis behaviour.\n\n\np      Populate  the  <service>  directory  with symlinks; a <service> directory in CPSVDEST\nmust already exist.\nIf a <service>/supervise symlink or directory is not found, cpsv creates  one.   If  a\n<service>/.meta/finish  file  exists,  and  a  <service>/finish file or symlink is not\nfound, cpsv creates a symlink to /lib/runit/finish-exec.\nWhen a <service>/log directory exists: if <service>/log/supervise link or directory is\nnot found, cpsv creates one; if <service>/log/run file or symlink is not  found,  cpsv\ncreates a symlink to /etc/sv/svlogd/run.\n\n\n\nd      Print  the  diff between the <service> directory that would be created with the a com‐\nmand and the current <service> directory in CPSVDEST. The exit status of diff is  re‐\nturned;  a <service> directory must exists in CPSVSOURCE.  supervise , conf and wtime\nare excluded from the diff.\n\n\ns      Sync CPSVDEST with CPSVSOURCE; for each  <service>  directory  in  CPSVSOURCE  cpsv\nsearch  the  system for a systemd or sysv service file with the same name: if it finds\none then it copies the <service> directory as when the a command is given and goes  to\nthe  next  directory;  else  cpsv  looks for the path written in a <service>/.meta/bin\nfile, and if such path exists in the system then it copies the <service> directory  as\nwhen the a command is given; otherwise it goes to the next directory.\n\n\nl      List  installed services in CPSVDEST; the name of each <service> that would be copied\nwith the s command is printed, preceded with character surronded by square brakets;\n[a]: <service>;\nexists in CPSVSOURCE but not in CPSVDEST\n[i]: <service>;\nexists both in CPSVSOURCE and CPSVDEST, the copy in CPSVDEST is identical\nto the one created with the a command\n[l]: <service>;\nexists both in CPSVSOURCE and CPSVDEST, the copy in CPSVDEST is different\nfrom the one created with the a command\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-f",
                    "content": "is  provided.   When  a  <service>/log directory exists, the <service>/log/run file or\nsymlink is replaced with the default one that is created with the p command; supervise\ndirectories or symlinks are never overwritten or replaced this way.\n\n\n",
                    "flag": "-f"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "CPSVDEST\nThe environment variable $CPSVDEST overrides the default directory where services are\ncopied. If omitted or empty, the default is /etc/sv\n\nCPSVSOURCE\nThe environment variable $CPSVSOURCE overrides the default directory from where  ser‐\nvices are copied. If omitted or empty, the default is /usr/share/runit/sv.src\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Lorenzo Puliti <plorenzo@disroot.org>\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "update-service(8)\n\nDecember 4, 2022                                   cpsv(8)",
            "subsections": []
        }
    },
    "summary": "cpsv - utility to install and manage runit services",
    "flags": [
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "is provided. When a <service>/log directory exists, the <service>/log/run file or symlink is replaced with the default one that is created with the p command; supervise directories or symlinks are never overwritten or replaced this way."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "update-service",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/update-service/8/json"
        }
    ]
}