• .service files, and .sh @ reboot

    From paulie420@1337:3/129 to All on Sat Apr 1 16:28:08 2023
    On my Linux system I host .service files in /etc/systemd/system or /usr/lib/systemd/system. I am able to make sure they load after the network is up with an After= line in the [Unit].

    I use crontab to run a start.sh script @reboot and it loads my Mystic bbs in daemon mode. All good. I don't use any GUI or Window Manager.
    -----
    I'm helping a friend who has different needs than my setup. They, also, need mrc.service and doorparty-connect.service to load at boot - but putting them in [my] standard locations they fail to load - they don't see the actual locations of the files - dpc2/mrc_client.py... I'm deducing that the mount point isn't there when they're trying to load???

    I tried to place those .service files in ~/.config/systemd/user - but that didn't seem to work and I changed the After= line to After=networking.service, but I believe I'm doing this wrong. Where/how is the proper place to put .services that should load after the Window Manager is fully up, network is up and mountpoints are done? (I want them to load after the system is up, but before the user logs in.)

    Putting the start.sh in a @reboot in crontab doesn't work for this user, because what they WANT is ./mis to run in server mode w/ that output in a terminal window... like on-screen when they login. I thought of putting that .sh in a .desktop file in ~/autostart, but that would only load after the user enters their password... again, I want this start.sh to load after the Window Manager is up, but before the user enters creds - and they want it output to a terminal window thats open and waiting on their desktop...


    I know I'm just used to systems w/o Desktop Environments - anyone have tips to do these two things?



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From osito@1337:3/129 to paulie420 on Sat Apr 1 21:43:04 2023
    I tried to place those .service files in ~/.config/systemd/user - but

    i hope i understand but you cant put ~ in a crontab you have to do /home/user/.config etc

    or put a 5 minute delay on the @reboot script. i dont fool around with the systemd directories. i just use teh /etc/systemd/system ii think it is

    after the user enters their password... again, I want this start.sh to

    run mis server from inside tmux

    Osito

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From MeaTLoTioN@1337:1/101 to paulie420 on Sun Apr 2 09:55:08 2023
    On 01 Apr 2023, paulie420 said the following...

    On my Linux system I host .service files in /etc/systemd/system or /usr/lib/systemd/system. I am able to make sure they load after the network is up with an After= line in the [Unit].

    I'm helping a friend who has different needs than my setup. They, also, need mrc.service and doorparty-connect.service to load at boot - but putting them in [my] standard locations they fail to load - they don't
    see the actual locations of the files - dpc2/mrc_client.py... I'm
    deducing that the mount point isn't there when they're trying to load???

    When you put the files in /etc/systemd/system or /usr/lib/systemd/system, did you run systemctl daemon-reload to pick up the files?

    ---
    |14Best regards,
    |11Ch|03rist|11ia|15n |11a|03ka |11Me|03aTLoT|11io|15N // @meatlotion:erb.pw

    |07── |08[|10eml|08] |15ml@erb.pw |07── |08[|10web|08] |15www.erb.pw |07───┐ |07── |08[|09fsx|08] |1521:1/158 |07── |08[|11tqw|08] |151337:1/101 |07┬──┘ |07── |08[|12rtn|08] |1580:774/81 |07─┬ |08[|14fdn|08] |152:250/5 |07───┘
    |07── |08[|10ark|08] |1510:104/2 |07─┘

    ... A Meteor is an example of a rock star.

    --- Mystic BBS v1.12 A48 2022/07/15 (Linux/64)
    * Origin: thE qUAntUm wOrmhOlE, rAmsgAtE, uK. bbs.erb.pw (1337:1/101)
  • From paulie420@1337:3/129 to osito on Sun Apr 2 18:40:50 2023
    I tried to place those .service files in ~/.config/systemd/user - but

    i hope i understand but you cant put ~ in a crontab you have to do /home/user/.config etc

    I *think* I used the full path in crontab, BUT thats a possibility - maybe I didn't... will double check.

    after the user enters their password... again, I want this start.sh t
    run mis server from inside tmux

    Another decent idea; I think theres a way to place a .service somewhere correctly, but I'm following you too... I wanna figure out the ... right way; not that this isn't, but. Thanks much osito.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From paulie420@1337:3/129 to MeaTLoTioN on Sun Apr 2 18:42:42 2023
    When you put the files in /etc/systemd/system or
    /usr/lib/systemd/system, did you run systemctl daemon-reload to pick up the files?

    Yea; they load before the network is up, even tho I added;
    [Unit]
    After=networking.service
    (and m0re..)

    However, the 'failure' was that it couldn't find the file - even tho we used the full path to the .sh and it was set to after networking. systemctl stated the system couldn't find the script - made me think it was loaded before the HDD was even mounted. ?

    Anyway, it seems like this is a ... thing; different distros do different things - cause on my non-WM system its a non-issue; just works.



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)
  • From Mindsurfer@1337:1/104 to paulie420 on Mon Apr 3 13:17:28 2023
    Anyway, it seems like this is a ... thing; different distros do
    different things - cause on my non-WM system its a non-issue; just
    works.
    also make sure you have no special chars or spaces in your whole path.
    i just tried to make that work with systemd unit files, but i gave up.
    there is a system-escape software in linux to escape such paths, but i
    still could not make it work with spaces in paths and systemd unit files.

    Regards,
    Mindsurfer

    --- MagickaBBS v0.15alpha (Linux/armv7l)
    * Origin: FuNToPia telnet://funtopia.dynv6.net:2023 (1337:1/104)
  • From Roon@1337:1/112 to Mindsurfer on Thu Apr 6 08:33:34 2023
    Hello Mindsurfer,

    03 Apr 23 13:17, you wrote to paulie420:

    Anyway, it seems like this is a ... thing; different distros do
    different things - cause on my non-WM system its a non-issue;
    just works.
    also make sure you have no special chars or spaces in your whole path.
    i just tried to make that work with systemd unit files, but i gave up. there is a system-escape software in linux to escape such paths, but i still could not make it work with spaces in paths and systemd unit
    files.

    never\ use\ spaces\ in\ paths\ or\ filenames\! :)

    Regards,
    --
    dp

    telnet://bbs.roonsbbs.hu:1212 <<=-

    ... 9:22am up 8 days, 22:52:12, load: 72 processes, 269 threads.
    --- GoldED/2 1.1.4.7+EMX
    * Origin: Roon's BBS - Budapest, HUNGARY (1337:1/112)
  • From paulie420@1337:3/129 to osito on Thu Apr 6 18:56:54 2023
    in your service file you put
    /bin/bash /path/to/script.sh
    right?

    Well, those were two different 'things'.

    The .service files are for MRC and DoorParty; mrc.service/doorparty.service.

    These just run the mrc_client.py and doorparty connector 2.

    The start.sh was in CRONTAB with an @reboot attribute - but that didn't work for the user b/c they want to see the server WFC screen in a terminal window. [I run in daemon mode @ 2oFB, so a .sh in crontab w0rks fine... but this user wants a physical terminal window to pop-up on their GUI - mL gave me a good suggestion and I think I'm just gonna run a .sh in their autostart window manager that runs the terminal and ./mystic server...]



    |07p|15AULIE|1142|07o
    |08.........

    --- Mystic BBS v1.12 A48 (Linux/64)
    * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (1337:3/129)