August 27, 20232 yr I've tried save aliases, such as: # My aliases alias vsync_full="rsync -rltOuv --delete --force /mnt/user/video/ [email protected]:/mnt/user/video/" alias cdv="cd /mnt/user/video" alias ll="ls -l --time-style=+%F\\ %T" alias lla="ls -lA --time-style=+%F\\ %T" ...into both /root/.bash_profile and /etc/profile, but either place I put them, they are soon after cleared away and I have to restore them again. Is there a better place where my aliases with reliably persist?
August 27, 20232 yr Solution Unraid starts fresh with every reboot, so you need to save the changes on the flash drive somewhere and then re-apply them via the go file (/config/go) or user scripts when the system starts up.
August 27, 20232 yr Author 2 hours ago, Squid said: Unraid starts fresh with every reboot, so you need to save the changes on the flash drive somewhere and then re-apply them via the go file (/config/go) or user scripts when the system starts up. So, should editing the go file to something like this do the trick? #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & cat /boot/config/my_profile >> /etc/profile I'd test it right now, but it's a bad time for a reboot at the moment.
August 28, 20232 yr Author 4 hours ago, RasterEyes said: I'd test it right now, but it's a bad time for a reboot at the moment. I got a chance to reboot just now, and the change based on Squid's suggestion works great. Thanks.
January 8, 20242 yr On 8/28/2023 at 5:46 AM, RasterEyes said: I got a chance to reboot just now, and the change based on Squid's suggestion works great. Thanks. so to be more exact: - I create a script somewhere on my flashdrive (for instance /boot/config/aliases.sh) - I set this script to launch in the /boot/config/go file - all done? Or your way? You copy the profile? On 8/27/2023 at 10:59 PM, Squid said: Unraid starts fresh with every reboot, so you need to save the changes on the flash drive somewhere and then re-apply them via the go file (/config/go) or user scripts when the system starts up.
January 13, 20242 yr Author On 1/8/2024 at 10:06 AM, Kees Fluitman said: Or your way? You copy the profile? I'm a little confused about what you're referring to as "my way", so I'll just try to be more clear about what worked for me: I created a file, /boot/config/my_profile (could be /boot/config/anything_you_want) which contained the extra stuff I wanted to append to /etc/profile -- just the extra stuff, not the full contents of that file. The only extras I wanted to add for myself were aliases, but you can add any other set-up commands you like. I then edited the existing /boot/config/go file to add this extra line: cat /boot/config/my_profile >> /etc/profile This causes my desired changes to be appended to /etc/profile at start-up.
January 15, 20242 yr yes perfect. i did it that way as well. root@server:/boot/config# cat /boot/config/go #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & cat /boot/config/kees_aliases >> /etc/profile
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.