mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 04:05:40 +03:00
29 lines
647 B
Text
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
|
|
}
|