-
Notifications
You must be signed in to change notification settings - Fork 418
[BUGFIX] replace hard-coded paths with configurable ones #1487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[BUGFIX] replace hard-coded paths with configurable ones #1487
Conversation
|
|
Example for a systemd service: (rough sketch, will work later with more changes from my fork) Details# /etc/systemd/system/armui.service
[Unit]
After=network-online.target
Description=Automatic Ripping Machine Web UI
Wants=network-online.target
[Service]
BindPaths=/mnt/frail/srv/rips/raw/
BindPaths=/mnt/frail/srv/rips/transcoded/
BindPaths=/mnt/frail/srv/rips/completed/
ConfigurationDirectory=arm # /etc/arm
DeviceAllow=block-sr rw
ExecStart=/usr/bin/armui
LogsDirectory=arm # /var/log/arm
LogsDirectory=arm/progress
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
Restart=always
RestartSec=3
StateDirectory=arm # /var/lib/arm
Type=exec
User=arm
[Install]
WantedBy=multi-user.target# /etc/systemd/system/arm@.service
[Unit]
Description=Automatic Ripping Machine Worker
[Service]
ConfigurationDirectory=arm # /etc/arm
ExecStart=/usr/bin/arm --no-syslog --devpath "%I"
LogsDirectory=arm
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
ReadWritePaths=/mnt/frail/srv/rips/raw/
ReadWritePaths=/mnt/frail/srv/rips/transcoded/
ReadWritePaths=/mnt/frail/srv/rips/completed/
ReadWritePaths=/dev/%I
RuntimeDirectory=arm # /run/arm
StateDirectory=arm # /var/lib/arm
User=arm |
microtechno9000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea and will help make changes easier, as some users have been keen to not run ARM from /opt.
However, I dont see where the environment variables are being defined. Is there a .env file thats missing, or maybe I miss understand what's happening here.
8f670a8 to
6465320
Compare
6465320 to
deeb9d3
Compare
|
Okay, basically rewrote the PR, imo it is much clearer now what I'm doing. Instead of five env vars, I'm now using just |
46482af to
4fb8a06
Compare
|
I would like to use Which strikes me as odd twice:
Here's what I would suggest (maybe I'll open another PR): Anyway, while this would be easy to change for docker users, the setups of people with a manual install would likely break. I deemed this probably bad and worked around it by querying Edit: testing is now gone through, here's the new log: 2_MULES_FOR_SISTER_SARAH_176298319677.log Landing this PR would now be fine for me, if you don't want me to make the change I outlined above. |
4fb8a06 to
09f0283
Compare
microtechno9000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments
The existing fstab rules are possibly a hang over from when ARM was not installed and maintained within docker. If a user installed arm on a system with Gnome or KDE, then the automount would mount the drive within the OS. |
|
Alright! I'll make the change right now, but I'm not home, so it might take until monday before I can test that. |
355d533 to
a54bdcd
Compare
|
Here's the interdiff for the latest change: IMO it's much simpler now. Should I make it clear on the alternate install method pages that there has been a change to the |
1e877f2 to
e7a899a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
- Location of arm.yaml can now optionally be set via the ARM_CONFIG_FILE environment variable - The default location stays the same (/etc/arm/config/arm.yaml) - All settings concerning paths in arm.yaml should now work as expected, the following have had their behavior fixed: - INSTALLPATH - APPRISE - ABCDE_CONFIG_FILE - LOGPATH - Mountpoints for discs are not hardcoded any more, instead: - If the disc is already mounted anywhere and the mountpoint is readable, it is used - Otherwise, the disc is mounted via `mount --all <devpath>` (aka. auto-mount) to wherever specified in `fstab` - That is the reason why the default `fstab` has changed, to allow for auto-mount
e7a899a to
aff6896
Compare
|
Adhering to systemd standards for the environment variables.
Description
All hard-coded paths can now be configured via environment variables. The names of the environment variables are chosen so that they can be read directly from systemd, if arm is started as a systemd service, see systemd.exec(5).
Type of change
How Has This Been Tested?
Ripped and transcoded a DVD successfully
Checklist:
Changelog:
$CONFIGURATION_DIRECTORY$RUNTIME_DIRECTORYis used for mountpoints$STATE_DIRECTORYis used for the DB$LOGS_DIRECTORYis used for the logs$PATHfrom/etc/environmentin the docker wrapper so we can call makemkv without an absolute pathLogs
EN-102281_175380153613.log