On Wed, Oct 25, 2023 at 7:04 PM Sai Sree Kartheek Adivi via lists.yoctoproject.org <[email protected]> wrote: > > - Install systemd service file or init script based on the distro_features > systemd/sysvinit. > - systemd service also needs to depend on lighttpd service so that matrix > won't start before the webserver. > > Signed-off-by: Sai Sree Kartheek Adivi <[email protected]> Acked-by: Sinthu Raja <[email protected]> > --- > v2: Handle both sysvinit and systemd > > .../matrix/matrix-gui/matrix-gui-2.0.service | 4 ++-- > > .../recipes-core/matrix/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmatrix-gui_2.0.bb&c=E,1,uI-aTWTLE9ebq4R3RRhS3S8RX4mThQe73KXtJzBcCtLbuT9CAfon0qUNsZaGAYmVEb7cr_NfkruorcLHBDi8AYtBCW2hrE-kRJZa5y3Skpd0&typo=1 > | 15 +++++++++------ > 2 files changed, 11 insertions(+), 8 deletions(-) > > diff --git > a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service > b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service > index 40a8f0f9..462803f3 100644 > --- a/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service > +++ b/meta-arago-demos/recipes-core/matrix/matrix-gui/matrix-gui-2.0.service > @@ -1,6 +1,6 @@ > [Unit] > Description=Matrix GUI > -After=weston.service > +After=weston.service lighttpd.service > Requires=weston.service > > Before=https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fgraphical.target&c=E,1,MPCJR5Y4V0RWJzSDnznRKN2ocAPgZGqc-8AanIuzWjQwtMXg4RzQOiBv1lfLcnGLmh4X1Webx5-n4SomRVgodrVDQJGczrNUthox4E9U-bkPoRTZtfoxsFUx&typo=1 > > @@ -12,7 +12,7 @@ IgnoreSIGPIPE=no > KillMode=process > GuessMainPID=no > RemainAfterExit=yes > -ExecStart=/etc/init.d/matrix-gui-2.0 start > +ExecStart=/usr/share/matrix-gui-2.0/matrix-gui-2.0 start > > [Install] > > WantedBy=https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmulti-user.target&c=E,1,FO2Ep-vm1QYUBkm_bcHCCXGwd7W8aDmv6B7saNjwSFd5K0QxebHludZWi273myKGPpfwX3GS-LvRbG7dqhbDZ4g_pyObIv0QgecW3MXn8A,,&typo=1 > diff --git > a/meta-arago-demos/recipes-core/matrix/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmatrix-gui_2.0.bb&c=E,1,S1mPhUDq1Ebyj8vRVLjlNdDwKY8xkbXYVvHUkQQHm4y6npO3yg9CGl1d6ufzS-zT8CeAHTxsPXamdttlpNhlp3HDeWnSkV5C0HLnm4KKui4T&typo=1 > > b/meta-arago-demos/recipes-core/matrix/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmatrix-gui_2.0.bb&c=E,1,0wzPiHCI02ttqigGTj-XVwcZ5pEiRSzuobJBNdwcbBa9GW2TmMRSzS3l0phNqekNzoq7jkyxwW7uq03K6PIR9m8OX2cS_jNWj6KPotaLQVRRsY4,&typo=1 > index 9299a929..508edb9b 100644 > --- > a/meta-arago-demos/recipes-core/matrix/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmatrix-gui_2.0.bb&c=E,1,EIwOZOJCxC7TXdt5ShejRgxesEuhZKooaS1Z-sBCwG8Hx03bBp4wobKMm98zjFzSBnII_qUdDvO-vc56huvTO90kNlUqmeWMSoA37fdUL-xMEGio&typo=1 > +++ > b/meta-arago-demos/recipes-core/matrix/https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmatrix-gui_2.0.bb&c=E,1,5NNhxGZ76cFnRRNxkiWeN706JKr2IUXiUV-Zxl5bRk-T_i8lexVL7kpKEgdqbSTaFpqcukoC6_vxrlB2rm6N3NYBiyc7Obuh_0LH26hfC6xaTP_4unwtavgD2A,,&typo=1 > @@ -50,12 +50,15 @@ do_install(){ > sed -i -e "s/__SWITCH_FOREGROUND_VT__/${SWITCH_FOREGROUND_VT}/" > ${WORKDIR}/${MATRIX_INITSCRIPT} > > # Install the script > - install -d ${D}${sysconfdir}/init.d > - install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} > ${D}${sysconfdir}/init.d/matrix-gui-2.0 > - > - # Install the systemd unit file > - install -d ${D}${systemd_system_unitdir} > - install -m 0644 ${WORKDIR}/matrix-gui-2.0.service > ${D}${systemd_system_unitdir} > + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', > 'false', d)}; then > + install -d ${D}${sysconfdir}/init.d > + install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} > ${D}${sysconfdir}/init.d/matrix-gui-2.0 > + fi > + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', > 'false', d)}; then > + install -d ${D}${systemd_system_unitdir} > + install -m 0644 ${WORKDIR}/matrix-gui-2.0.service > ${D}${systemd_system_unitdir} > + install -m 0755 ${WORKDIR}/${MATRIX_INITSCRIPT} > ${D}${MATRIX_BASE_DIR}/matrix-gui-2.0 > + fi > } > > GUIDEPS = > "${@bb.utils.contains('DISTRO_FEATURES','opengl',"matrix-gui-browser > refresh-screen",'',d)}" > -- > 2.34.1 > > > > > >
-- With Regards Sinthu Raja -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15003): https://lists.yoctoproject.org/g/meta-arago/message/15003 Mute This Topic: https://lists.yoctoproject.org/mt/102177988/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
