1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 04:05:40 +03:00
aports/testing/anbox/anbox-container-manager.initd
Antoine Fontaine aeaacb0142 testing/anbox: move android image location
this allows removing /var/lib/anbox while anbox is stopped to do
a "factory reset"
2020-04-03 07:57:49 +00:00

29 lines
647 B
Text

#!/sbin/openrc-run
supervisor=supervise-daemon
name="Anbox container manager"
command=/usr/bin/anbox
command_args="container-manager --daemon --privileged --data-path=/var/lib/anbox --android-image=/usr/share/anbox/android.img"
depend() {
need localmount sysfs cgroups fuse
after firewall
}
start_pre() {
# that's all you need to avoid the lxc dependency
checkpath --directory /usr/lib/lxc
checkpath --directory /usr/lib/lxc/rootfs
modprobe loop
modprobe tun
/usr/share/anbox/anbox-bridge.sh start
}
stop_post() {
# ideally, we would stop it _after_ shutting down
# the container manager.
/usr/share/anbox/anbox-bridge.sh stop
}