Skip to content

Commit

Permalink
Run as non-root
Browse files Browse the repository at this point in the history
  • Loading branch information
muckngrind4 committed Jan 24, 2018
1 parent c4cfc39 commit d3b9c6d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
13 changes: 11 additions & 2 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,19 @@ If you have a new DVD drive that you haven't used before, some require setting
cd arm
pip3 install -r requirements.txt
ln -s /opt/arm/51-automedia.rules /lib/udev/rules.d/
ln -s /opt/arm/.abcde.conf /root/
cp /opt/arm/arm@.service /etc/systemd/system/
ln -s /opt/arm/setup/.abcde.conf /root/
cp /opt/arm/setup/arm@.service /etc/systemd/system/
cp config.sample config

Setup 'arm'user:
groupadd arm
useradd -m arm -g arm
passwd arm
<enter new password>

Create entries in /etc/fstab to allow non-root to mount dvd-roms
/dev/sr0 /mnt/dev/sr0 udf,iso9660 user,noauto,exec,utf8 0 0

- Edit your "config" file to determine what options you'd like to use
- To rip Blu-Rays after the MakeMKV trial is up you will need to purchase a license key or while MakeMKV is in BETA you can get a free key (which you will need to update from time to time) here: https://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053 and create /root/.MakeMKV/settings.conf with the contents:

Expand Down
5 changes: 3 additions & 2 deletions arm/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ def identify(disc):
if not os.path.exists(str(disc.mountpoint)):
os.makedirs(str(disc.mountpoint))

os.system("mount " + disc.devpath + " " + disc.mountpoint)
# os.system("mount " + disc.devpath + " " + disc.mountpoint)
os.system("mount " + disc.devpath)

logging.info("Getting movie title...")
disc.videotitle, disc.videoyear = getmovietitle.main(disc)

logging.info("Getting video type...")
disc.videotype, disc.videoyear = getvideotype.main(disc)

os.system("umount " + str(disc.mountpoint))
os.system("umount " + disc.devpath

logging.info("Disc title: " + str(disc.videotitle) + " : " + str(disc.videoyear) + " : " + str(disc.videotype))
logging.debug("Identification complete: " + str(disc))
Expand Down
2 changes: 2 additions & 0 deletions setup/arm@.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Description=Automatic Ripping Machine

[Service]
Type=oneshot
User=arm
Group=arm
ExecStart=/opt/arm/arm/main.py -d %i

[Install]
Expand Down

0 comments on commit d3b9c6d

Please sign in to comment.