Anybody know anything about /etc/udev triggers for autoripping?
#1
SO I can't seem to get my udev script to work in order to start up abcde for auto ripping.  

my udev rule is in a file called: 

/etc/51-autoripcd.rules

and it contains the following line

    SUBSYSTEM=="block", KERNEL=="sr0", ACTION--"change",  RUN+="/usr/bin/cdautoinsert &"

which should run the following script /usr/bin/cdautoinsert if a CD is inserted:

   #!/bin/bash

   PATH=/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  

   /bin/abcde -NVP | tee /var/log/abcde-auto.log  

   exit

I can only get this script to run if I run it directly with sudo.  I can't seem to get it to start on CD insert or without sudo from the command line. Part of that I realize is a permissions thing,  but I can't seem to get to any of it on inserting a CD.

Anyone have any experience here?

tnx
73
Tim
Reply

#2
(11-Jul-2021, 01:29 AM)Coacharnold Wrote: SO I can't seem to get my udev script to work in order to start up abcde for auto ripping.  

my udev rule is in a file called: 

/etc/51-autoripcd.rules

and it contains the following line

    SUBSYSTEM=="block", KERNEL=="sr0", ACTION--"change",  RUN+="/usr/bin/cdautoinsert &"

which should run the following script /usr/bin/cdautoinsert if a CD is inserted:

   #!/bin/bash

   PATH=/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  

   /bin/abcde -NVP | tee /var/log/abcde-auto.log  

   exit

I can only get this script to run if I run it directly with sudo.  I can't seem to get it to start on CD insert or without sudo from the command line. Part of that I realize is a permissions thing,  but I can't seem to get to any of it on inserting a CD.

Anyone have any experience here?

tnx
73
Tim

Hi Tim, I seem to recall that 'eject' needs to be installed for that to work. I may be wrong but that's first thought.
https://packages.ubuntu.com/search?keywords=eject
Reply

#3
Please try the following:
  1. Create a custom.service file similar to this
    Code:
    [Unit]
    Description=My custom startup script
    After=syslog.target network.target

    [Service]
    # run my_startup script as user root
    #
    User=root
    ExecStart=/bin/bash /home/xx/my_startup.sh

    [Install]
    WantedBy=multi-user.target
  2. Copy custom.service to /etc/systemd/system
  3. Reload the config: sudo systemctl daemon-reload
  4. Start the service: sudo systemctl start custom
  5. Check the service status: sudo systemctl status custom
  6. If all ok, enable the service so it runs automatically: sudo systemctl enable custom
More systemctl info here
https://www.digitalocean.com/community/t...-and-units
Reply



Bookmarks



Users browsing this thread:
1 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
Can snakeoil os be installed on Ubuntu 2...
Last Post: Snoopy8
25-Jul-2024 09:49 AM
» Replies: 22
» Views: 890
Snakeoil Music server & Snakeoil its own...
Last Post: Snoopy8
22-Jul-2024 05:51 PM
» Replies: 9
» Views: 658
Openssh vulnerability is fixed in Mantic
Last Post: patricia1066
17-Jul-2024 02:56 AM
» Replies: 0
» Views: 32
install Snakeoil on Audio Alchemy DMP-1 ...
Last Post: Snoopy8
13-Jul-2024 09:13 PM
» Replies: 1
» Views: 48
Installation problem
Last Post: Snoopy8
09-Jul-2024 12:21 PM
» Replies: 25
» Views: 5956
Something seriously wrong with Squeezeli...
Last Post: Snoopy8
01-Jul-2024 09:22 AM
» Replies: 11
» Views: 524
[split] Real Time Kernels discussion
Last Post: Snoopy8
01-Jul-2024 06:46 AM
» Replies: 42
» Views: 5901
Portable Snakeoil :-) First test.
Last Post: Snoopy8
30-Jun-2024 06:26 PM
» Replies: 26
» Views: 3877
Snakeoil virtualized (PROXMOX), USB+PCI ...
Last Post: agent_kith
25-Jun-2024 02:38 PM
» Replies: 3
» Views: 174
Announcing Snakeoil Measurements 1.3.0
Last Post: Snoopy8
22-Jun-2024 07:22 AM
» Replies: 98
» Views: 7662

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2024. Theme © Melroy van den Berg.