Add seedbox cifs mount

This commit is contained in:
Alex D. 2022-04-19 13:00:25 +00:00
parent 42a081bb3b
commit 331c94f473
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
7 changed files with 56 additions and 7 deletions

3
.gitignore vendored
View File

@ -4,8 +4,9 @@ pkg/
secret/alpinepkg-httpauth/secret
secret/radicale-httpauth/secret
openrc/vtun/secret
secret/seedbox-mount/secret
secret/letsencrypt/private.key
openrc/vtun/secret
config/telegraf/secret
config/grafana/secret

View File

@ -0,0 +1,13 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-openrc.template
pkgver=2022.04.19.10
pkgrel=0
depends="redxen-secret-seedbox-mount cifs-utils"
sha512sums="
d9661deeef39cb84c347f80ad78e8f455d201d1375d6c3ac7064321edb7d619d685dce71993b8644fe91c0a8f2f29c52c2a79b8a91360d08a230f27369a54ecb runfile
b0de4ab3bb8b039b6609a92f2fe8bb42f4bdad0d777e4281f34becd6269e5a8cb99a5c15cb5fc0b5e86ff04ddfeff2032311452aa986debc2def0e146cf7d050 conffile
"

View File

@ -0,0 +1,3 @@
mountpath="/seedbox"
endpoint="//u299888-sub1.your-storagebox.de/u299888-sub1"
creds="/etc/redxen/seedbox-mount/secret"

View File

@ -0,0 +1,22 @@
#!/sbin/openrc-run
supervisor=supervise-daemon
depend() {
use net
need localmount
}
start_pre() {
checkpath -d -m 744 -o transmission:transmission "$mountpath"
checkpath -d -m 744 -o root:root /sftp-chroot/"$mountpath"
}
start() {
mount -t cifs -o credentials="$creds",rw,cache=none,seal,uid="$(id -u transmission)",gid="$(id -g transmission)",dir_mode=0755,file_mode=0644 "$endpoint" "$mountpath" || stop
mount --bind "${mountpath}" /sftp-chroot"${mountpath}" || stop
}
stop() {
umount /sftp-chroot"$mountpath" || true
umount "$mountpath" || true
}

View File

@ -3,11 +3,11 @@
. ../APKBUILD-openrc.template
pkgver=2021.06.06.01
pkgver=2022.04.19.01
pkgrel=5
depends="openrc transmission-daemon redxen-config-$_rx_pkgname"
depends="openrc transmission-daemon redxen-config-$_rx_pkgname redxen-openrc-seedbox-mount"
sha512sums="
33b7455f8c5dd447bba922baec758014951c98f7d0566092c4e71cac34e1dea3777cbde75d6d17145a78c320ac4165de395f2b33e59093eb849433d09bf2367c runfile
57e860c205ae7d08bd4d955887705d0727df755e2b7c4ece737cce8878e45d94c2c060cb14f01c0bd38db938bf0d62397ba76f313a3ce1b50dd60946156d99fa runfile
1093691d509aa49100e944f2308702bd9475da36f1dfe536dd5cc5bb67fcc123d927c3a6810812fa4ada40f9b445dc114b22db3e6799319b4ad9f0bdfbf67278 conffile
"

View File

@ -19,8 +19,8 @@ pidfile="${pidfile:-${rundir}/transmission.pid}"
command_args="--pid-file ${pidfile}"
depend() {
need net
after firewall
need net redxen.seedbox-mount
after firewall redxen.seedbox-mount
}
check_config() {
@ -42,4 +42,3 @@ reload() {
start-stop-daemon --signal HUP --pidfile ${pidfile}
eend $?
}

View File

@ -0,0 +1,11 @@
# Contributor: Alex Denes <caskd@redxen.eu>
# Maintainer: Alex Denes <caskd@redxen.eu>
. ../APKBUILD-secret.template
pkgver=2022.04.17.01
pkgrel=0
source="secret"
sha512sums="
24d41c3cc0bcd09f90f3e748ac5bc2bd8844ed27ab22faa8cffc1ce1fa3cfdb2727b80a2b2f22ee91a9470de5c2c99db6873bbb7294903a6133ece13ab429b6a secret
"