Git Product home page Git Product logo

Comments (4)

gotbletu avatar gotbletu commented on June 15, 2024

~/.config/autostart just means it only runs as the user logs in. If you want to run it at boot time you would need a systemd service file.

Usually each distro would create group/user/systemd_service_file/config_directory for transmission once you install it. Maybe tell the Solus transmission-daemon package maintainer to do that? So yea you would have to create those if it does not exist

  1. whichever one seem closes to Solus, make a directory path to save the settings
    e.g arch
    /var/lib/transmission/.config/transmission-daemon/settings.json
    or
    e.g ubuntu
    /etc/transmission-daemon/settings.json
  2. create group/user for transmission
  • without login access /usr/sbin/nologin
  • point home folder to /var/lib/transmission (e.g arch) or /etc/transmission-daemon (e.g ubuntu)
  1. create systemd, this is what i looks like on archbase system
[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target

from serverscripts.

Abhinav1217 avatar Abhinav1217 commented on June 15, 2024

Thanks for info. Here is an update,

  1. I tried locate and find, only transmission-daemon/settings.json is located at .config at home directory. So now the problem is if I add $HOME or uname or anything in script, it will point to root user not the actual user, because script needs to be executed as sudo. And Solus doesn't actually open access to root user by default. Only reason I have one is because I am a developer and adept enough to work with it.

We didn't have any workaround on this back when I was maintainer of Fedy, So I need your help with this. How to execute a script as sudo and find path to user's home directory within script.

  1. I created the user group transmission with home folder currently hardcoded to /home/abhinav/transmission-daemon (I didn't knew it was possible) Works fine.

3 I manually created service file for transmission-daemon. Script is based on work we did in fedy so it should be reliable. It feels like Solus prefers to keep their service file in /usr/lib64/systemd/system and use symlinks or /etc/systemd/system/multi-user.target.wants/. So I have used same approch. Default paths for service file on fedora were different.

So in summery, I need help with problem number one and then, I can reliably test it and submit a PR.

from serverscripts.

gotbletu avatar gotbletu commented on June 15, 2024
  1. no dont try to use the current user or current home, we trying to avoid that since its going to run as its own user. You need to create a new user/group/home.
    e.g
PACKAGE_HOME="/var/lib/transmission"
USERNAME=transmission
GROUPNAME=transmission
groupadd "$GROUPNAME"
useradd -d "$PACKAGE_HOME" -M -s /usr/sbin/nologin -g "$GROUPNAME" "$USERNAME"
chown "$USERNAME":"$GROUPNAME" "$PACKAGE_HOME"
chmod -R 775 "$PACKAGE_HOME"

from serverscripts.

Abhinav1217 avatar Abhinav1217 commented on June 15, 2024

Ok.. I will get back to you by Tuesday.. It's Diwali week in India so office is hectic during day and evenings are busy with pooja.

I have already implemented user and group creation, And created systemd startup service. I will modify scripts as per your suggestion. I think I will also bootup a Solus VM for testing.

from serverscripts.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.