mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-18 07:18:58 -04:00
net-misc/aliyundrive-webdav: add env file
This commit is contained in:
parent
de356c812e
commit
df52f2ac08
@ -290,7 +290,13 @@ CRATES="
|
||||
zip-0.6.4
|
||||
"
|
||||
|
||||
inherit cargo systemd
|
||||
inherit cargo systemd readme.gentoo-r1
|
||||
|
||||
DOC_CONTENTS="After install, please copy
|
||||
/etc/aliyundrive-webdav/aliyundrive-webdav.env.example
|
||||
to /etc/aliyundrive-webdav/aliyundrive-webdav.env
|
||||
to set REFRESH_TOKEN, WEBDAV_AUTH_USER, WEBDAV_AUTH_PASSWORD etc.
|
||||
You can change ALIYUNDRIVE_WEBDAV_FLAGS to add more flags for aliyundrive-webdav"
|
||||
|
||||
DESCRIPTION="WebDAV server for AliyunDrive"
|
||||
# Double check the homepage as the cargo_metadata crate
|
||||
@ -316,5 +322,12 @@ QA_FLAGS_IGNORED="usr/bin/${PN}"
|
||||
src_install()
|
||||
{
|
||||
cargo_src_install
|
||||
systemd_newunit systemd.service aliyundrive-webdav.service
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
insinto "/etc/${PN}"
|
||||
doins "${FILESDIR}/${PN}.env.example"
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "${DOC_CONTENTS}"
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
#### aliyundrive-webdav env file
|
||||
|
||||
## HOST: Listen host [default: 0.0.0.0]
|
||||
#HOST=0.0.0.0
|
||||
|
||||
## PORT: Listen port [default: 8080]
|
||||
#PORT=8080
|
||||
|
||||
## CLIENT_ID: Aliyun drive client_id
|
||||
#CLIENT_ID=
|
||||
|
||||
## CLIENT_SECRET: Aliyun drive client_secret
|
||||
#CLIENT_SECRET=
|
||||
|
||||
## REFRESH_TOKEN: Aliyun drive refresh token
|
||||
#REFRESH_TOKEN=
|
||||
|
||||
## WEBDAV_AUTH_USER: WebDAV authentication username
|
||||
#WEBDAV_AUTH_USER=
|
||||
|
||||
## WEBDAV_AUTH_PASSWORD: WebDAV authentication password
|
||||
#WEBDAV_AUTH_PASSWORD=
|
||||
|
||||
## TLS_CERT: TLS certificate file path
|
||||
#TLS_CERT=
|
||||
|
||||
## TLS_KEY: TLS private key file path
|
||||
#TLS_KEY=
|
||||
|
||||
## WEBDAV_STRIP_PREFIX: Prefix to be stripped off when handling request
|
||||
#WEBDAV_STRIP_PREFIX=
|
||||
|
||||
## ALIYUNDRIVE_WEBDAV_FLAGS: Allow users to override command-line options
|
||||
#ALIYUNDRIVE_WEBDAV_FLAGS=
|
13
net-misc/aliyundrive-webdav/files/aliyundrive-webdav.service
Normal file
13
net-misc/aliyundrive-webdav/files/aliyundrive-webdav.service
Normal file
@ -0,0 +1,13 @@
|
||||
[Unit]
|
||||
Description=AliyunDrive WebDAV
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/etc/aliyundrive-webdav/aliyundrive-webdav.env
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/aliyundrive-webdav --auto-index -w /var/aliyundrive-webdav $ALIYUNDRIVE_WEBDAV_FLAGS
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user