acme.sh
acme.sh copied to clipboard
[Feature Request] Use The XDG Base Directory Specification
The .acme.sh/ directory unnecessarily pollutes users' home directory.
The XDGBDS defines where these files should be placed with environment variables in order to avoid this.
The XDG Base Directory Specification is based on the following concepts:
There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable
$XDG_DATA_HOME.There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable
$XDG_CONFIG_HOME.There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable
$XDG_STATE_HOME.There is a single base directory relative to which user-specific executable files may be written.
There is a set of preference ordered base directories relative to which data files should be searched. This set of directories is defined by the environment variable
$XDG_DATA_DIRS.There is a set of preference ordered base directories relative to which configuration files should be searched. This set of directories is defined by the environment variable
$XDG_CONFIG_DIRS.There is a single base directory relative to which user-specific non-essential (cached) data should be written. This directory is defined by the environment variable
$XDG_CACHE_HOME.There is a single base directory relative to which user-specific runtime files and other file objects should be placed. This directory is defined by the environment variable
$XDG_RUNTIME_DIR.All paths set in these environment variables must be absolute. If an implementation encounters a relative path in any of these variables it should consider the path invalid and ignore it.
Would you accept an MR for this?
@Neilpang what do you think about this subject ? Is that okay for vendors packaging acme.sh to use different and more standard directories ?
@williamdes I don't mind where it's installed. but if it's installed in a non-default location, don't forget to use --home parameter or the LE_WORKING_DIR env.
There are a lot of parameters to specify the install locations:
https://github.com/acmesh-official/acme.sh/wiki/How-to-install#4-advanced-installation
acme.sh would always respect these parameters.