Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 498012 - net-misc/flexget-1.2.31 - add init.d script
Summary: net-misc/flexget-1.2.31 - add init.d script
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on: 614758
Blocks:
  Show dependency tree
 
Reported: 2014-01-13 16:36 UTC by Peter
Modified: 2017-05-07 16:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Flexget init.d script (flexget-1.2.31,455 bytes, text/plain)
2014-01-13 16:37 UTC, Peter
Details
Flexget-1.2.31 ebuild patch (flexget-1.2.31.ebuild.patch,430 bytes, patch)
2014-01-13 16:37 UTC, Peter
Details | Diff
Flexget init.d script (flexget-1.2.31,536 bytes, text/plain)
2014-01-15 09:58 UTC, Peter
Details
Flexget conf.d script (flexget_conf,220 bytes, text/plain)
2014-01-15 09:58 UTC, Peter
Details
Flexget-1.2.31 ebuild patch (flexget-1.2.31.patch,615 bytes, patch)
2014-01-15 09:59 UTC, Peter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2014-01-13 16:36:31 UTC
Flexget added daemon support from version 1.2. This patch aims to control Flexget daemon adding init.d support.

There are two files:
1) flexget-1.2.31: init.d script to control Flexget daemon, should be copied in $PORTAGE_DIR/net-misc/flexget/files
2) flexget-1.2.31.ebuild.patch: patch to apply to the current ebuild.
Comment 1 Peter 2014-01-13 16:37:08 UTC
Created attachment 367792 [details]
Flexget init.d script
Comment 2 Peter 2014-01-13 16:37:39 UTC
Created attachment 367794 [details, diff]
Flexget-1.2.31 ebuild patch
Comment 3 Mike Gilbert gentoo-dev 2014-01-13 19:35:54 UTC
Sounds like a good idea.
Comment 4 Mike Gilbert gentoo-dev 2014-01-13 21:51:32 UTC
This init script would start flexget as root, which is a really bad idea.

I'm not really sure it makes sense to create a dedicated "flexget" user either; most people probably run flexget under their own user account and the configuration lives in $HOME/.flexget.
Comment 5 Peter 2014-01-14 08:39:17 UTC
I don't know how most of the users have it configured, but I was wondering if this could be a good aproach:

- Create user flexget
- Create symbolic link of configuration file to /etc/conf
  /home/flexget/.flexget/config.yml -> /etc/conf.d/flexget
  or
  /home/flexget/.flexget/config.yml -> /etc/flexget/config.yml
- Modify the current init script to run as user flexget


If most of the users run it from their own user (instead of via flexget), could we post a non-complete init script or is this solution a little bit dirty. I mean to post the init script modified to be run as user nobody and modify the ebuild to post a message at the end, telling the user to modify it if he/she wants to use the init script to handle flexget daemon.
Comment 6 Mike Gilbert gentoo-dev 2014-01-14 17:13:19 UTC
(In reply to Peter from comment #5)

I think I would prefer the second option (incomplete init script). We could just have the init script error out if a user name has not been set in a variable in /etc/conf.d/flexget.
Comment 7 Peter 2014-01-15 09:58:02 UTC
Created attachment 367886 [details]
Flexget init.d script

Updated version of init.d script to support custom user/configuration
Comment 8 Peter 2014-01-15 09:58:47 UTC
Created attachment 367888 [details]
Flexget conf.d script

Basic configuration file needed to run the init.d script
Comment 9 Peter 2014-01-15 09:59:50 UTC
Created attachment 367890 [details, diff]
Flexget-1.2.31 ebuild patch

Added conf.d file as well as a message to let know the user he/she needs to edit the configuration file before using the init.d script.
Comment 10 Peter 2014-01-15 10:03:37 UTC
(In reply to Mike Gilbert from comment #6)

Ok, I think with the actual patches and new files it should work as intended:
  - The init.d script won't start with the actual conf.d file (unconfigured)
  - The user can configure the conf.d file to start the daemon with the correct user/configuration.

Of course, any feedback is always welcome.