• Run an application or a script at boot as root?


    I want to run at boot

    systemctl start sabnzbd.service

    or

    ExecStart=/usr/bin/python2 /opt/sabnzbd/SABnzbd.py -d

    as ROOT

    I have tried many things around the web but unfortunately nothing is working.
    Before I could do it with rc.local as a service but now is not working.
    I dont know what I am doing wrong or maybe something changed with systemd? 😥

    if someone could guide me step by step or at least give me some tips would be much appreciated.

    Kyrisk

  • sorry for late reply, notifications on forum was screwed up…

    to enable a systemd service at boot you need to use enable
    sudo systemctl enable sabnzbd.service

    Archwiki say:
    Both sabnzbd and sabnzbd-git provide the sabnzbd.service systemd unit, create the user and group sabnzbd, and use /opt/sabnzbd/sabnzbd.ini for configuration.
    Add users to the sabnzbd group to allow access to SABnzbd files.

    sudo useradd -r -s /bin/false sabnzbd
    sudo groupadd sabnzbd
    

    if i understand it right: you need to add the new created user and your personal user to the newly created group:

    sudo gpasswd -d sabnzbd sabnzbd
    sudo gpasswd -d *yourusername* sabnzbd
    

    https://wiki.archlinux.org/index.php/SABnzbd#Using_systemd

  • Well I was a bit mad about this and I bought a Synology DS 718+.

    Actually the main reason is that I had a 1000w desktop PC running these apps and it was not efficient so I bought a Synology NAS(DS 718+) that supports docker and installed everything there + some more things I wanted to do.

    Thanks for your reply :)

  • does it work now?
    as i am not sure that this user is nessesarry:

    sudo useradd -r -s /bin/false sabnzbd
    

    i copy the fact only from Archwiki, but it looks a bit unusual to me that a user is needed… but similar we need for avahi as far as i remember, so may it is totally o.k.

  • B.T.W. nice device:
    Bild Text

boot261 application27 root22 Posts 5Views 456
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.