add some services

This commit is contained in:
teldra 2019-12-30 13:43:23 +01:00
parent 8921aea6db
commit b2f112b928
15 changed files with 211 additions and 0 deletions

View File

@ -0,0 +1,31 @@
[main]
@type = longrun
@description = "dbus system daemon"
@user = ( root )
@maxdeath = 3
@notify = 4
@options = ( log env )
@timeout-up=3000
[start]
@build = auto
@execute = (
s6-ipcserver-socketbinder -- ${socket_dir}/${socket_name}
foreground { dbus-uuidgen --ensure }
execl-cmdline -s { dbus-daemon ${cmd_args} }
)
[stop]
@build = auto
@execute = ( s6-rmrf ${socket_dir}/${socket_name} )
[logger]
@build = auto
@backup = 3
@maxsize = 1000000
@timestamp = iso
[environment]
cmd_args=!--system --print-pid=4 --nofork --nopidfile --address=unix:path=/run/dbus/system_bus_socket
socket_dir=!/run/dbus
socket_name=!system_bus_socket

View File

@ -0,0 +1,34 @@
[main]
@type = longrun
@description = "dbus session daemon for @I user"
@user = ( user )
@maxdeath = 3
@notify = 4
@options = ( log env )
@timeout-up=3000
[start]
@build = auto
@execute = (
execl-subuidgid -o @I
s6-ipcserver-socketbinder -- ${socket_dir}/${socket_name}
execl-cmdline -s { dbus-daemon ${cmd_args} }
)
[stop]
@build = auto
@execute = (
execl-subuidgid -o @I
s6-rmrf ${socket_dir}/${socket_name}
)
[logger]
@build = auto
@backup = 3
@maxsize = 1000000
@timestamp = iso
[environment]
cmd_args=!--session --print-pid=4 --nofork --nopidfile --address=unix:path=/run/user/${UID}/dbus
socket_dir=!/run/user/${UID}
socket_name=!dbus

View File

@ -0,0 +1 @@
d /run/dbus 0755

View File

@ -0,0 +1,14 @@
[main]
@type = longrun
@description = "elogind daemon"
@user = ( root )
@options = ( log )
@depends = ( dbus )
[start]
@build = auto
@execute = ( exec -c /usr/libexec/elogind/elogind.wrapper )
[stop]
@build = auto
@execute = ( s6-rmrf /run/elogind/root )

View File

@ -0,0 +1,14 @@
[main]
@type = longrun
@description = "lightdm daemon"
@user = ( root )
@options = ( log )
@depends = ( dbus )
[start]
@build = auto
@execute = ( exec -c lightdm )
[stop]
@build = auto
@execute = ( s6-rmrf /run/lightdm/root )

View File

@ -0,0 +1,15 @@
[main]
@type = classic
@description = "ntpd daemon"
@user = ( root )
@options = ( log env )
[start]
@build = auto
@execute = ( execl-cmdline -s { ntpd ${cmd_args} -c ${conf_dir}/${conf_file} } )
[environment]
cmd_args=!-n -u ntp:ntp
conf_dir=!/etc/ntp
conf_file=!ntp.conf

View File

@ -0,0 +1,15 @@
[main]
@type = classic
@description = "ssh daemon"
@user = ( root )
@options = ( log env )
[start]
@build = auto
@execute = (
foreground { exec ssh-keygen -A }
execl-cmdline -s { /usr/bin/sshd -f ${conf_file} ${cmd_args} } )
[environment]
conf_file=!/etc/ssh/sshd_config
cmd_args=!-D

View File

@ -0,0 +1,12 @@
[main]
@type = classic
@description = "Launch @I"
@user = ( root )
@options = ( env )
[start]
@build = auto
@execute = ( execl-cmdline -s { agetty ${cmd_args} @I } )
[environment]
cmd_args=!-J 38400

View File

@ -0,0 +1,69 @@
# Template file for '66-boot-stage1'
pkgname=66-boot-stage1
version=0.1.2.0
revision=2
wrksrc=services
create_wrksrc=yes
build_wrksrc="boot-66serv-v${version}"
#archs="i686 x86_64"
build_style=gnu-configure
#configure_args=""
#make_build_args=""
#make_install_args=""
#conf_files=""
#make_dirs="/var/log/dir 0755 root root"
hostmakedepends=""
makedepends=""
depends=""
short_desc="Services for 66"
maintainer="teldra <teldra@rotce.de>"
license="GPL-3.0-or-later"
homepage="https://framagit.org/pkg/observice"
distfiles="https://framagit.org/Obarun/boot-66serv/-/archive/v${version}/boot-66serv-v${version}.tar.gz"
checksum="41264add722f0b7292a2b29050d9ab6d1feb21aa20198ae12a42422629db26ae"
subpackages="66-service-tty 66-service-sshd 66-service-dbus 66-service-lightdm 66-service-ntpd 66-service-elogind"
66-service-tty_package() {
short_desc+=" - tty@"
pkg_install() {
vinstall ${FILESDIR}/tty@ 755 usr/share/66/service/
}
}
66-service-sshd_package() {
short_desc+=" - sshd"
pkg_install() {
vinstall ${FILESDIR}/sshd 755 usr/share/66/service/
}
}
66-service-dbus_package() {
short_desc+=" - dbus"
pkg_install() {
vinstall ${FILESDIR}/dbus 755 usr/share/66/service/
vinstall ${FILESDIR}/dbus.conf 755 usr/share/66/service/
vinstall ${FILESDIR}/dbus-session@ 755 usr/lib/tmpfiles.d/
}
}
66-service-lightdm_package() {
short_desc+=" - lightdm"
pkg_install() {
vinstall ${FILESDIR}/lightdm 755 usr/share/66/service/
}
}
66-service-ntpd_package() {
short_desc+=" - ntpd"
pkg_install() {
vinstall ${FILESDIR}/ntpd 755 usr/share/66/service/
}
}
66-service-elogind_package() {
short_desc+=" - elogind"
pkg_install() {
vinstall ${FILESDIR}/elogind 755 usr/share/66/service/
}
}

1
srcpkgs/66-service-dbus Symbolic link
View File

@ -0,0 +1 @@
66-boot-stage1

1
srcpkgs/66-service-elogind Symbolic link
View File

@ -0,0 +1 @@
66-boot-stage1

1
srcpkgs/66-service-lightdm Symbolic link
View File

@ -0,0 +1 @@
66-boot-stage1

1
srcpkgs/66-service-ntpd Symbolic link
View File

@ -0,0 +1 @@
66-boot-stage1

1
srcpkgs/66-service-sshd Symbolic link
View File

@ -0,0 +1 @@
66-boot-stage1

1
srcpkgs/66-service-tty Symbolic link
View File

@ -0,0 +1 @@
66-boot-stage1