Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[RESOLVED] profile - where is it? want to add to PATH

Featured Replies

I want to update the PATH environmental variable to include /boot/scripts and have it there upon each reboot.

 

I tried updating the /etc/profile but that didn't seem to stick between reboots.

 

I tried the following in go but that didn't work either:

export PATH=${PATH}:/boot/scripts

 

 

Update your go script to update your /etc/profile script at every boot.

it would be something like.

 

echo 'PATH=$PATH:/boot/scripts ; export PATH' >> /etc/profile

 

Note the use of single quotes in there. You do not want path getting interpreted in the go script.

Note where the colon and semi colon are too.

It could be split into two lines if you choose.

  • Author

did some more digging and found the answer.

 

put in the go script

 

echo 'export PATH=${PATH}:/boot/scripts' > /root/.profile

 

 

Note: be sure to use single quote, not double quote otherwise you get different results

did some more digging and found the answer.

 

put in the go script

 

echo 'export PATH=${PATH}:/boot/scripts' > /root/.profile

 

 

Note: be sure to use single quote, not double quote otherwise you get different results

 

You are overwriting /root/.profile rather then appending >>

 

also updating /etc/profile the same way works for all users.

  • Author

Thanks WeeboTech.  Might do your way if I decide I want the changed PATH for all users, else I might just leave it for /root/.profile

 

So from my experiments, I assume that /etc/profile gets "rebuilt/recreated" at each reboot from the biz* processes ?

 

Will take a little getting used to. Know a little Unix (AIX) and Shell (ksh) Scripting, guess I'll be learning more as I go along regarding linux, bash, and unRAID specifics

 

 

  • Author

 

You are overwriting /root/.profile rather then appending >>

 

also updating /etc/profile the same way works for all users.

 

Yes, but since /root/.profile didn't exist prior, not overlaying anything. Guess I need to see if /root/.profile is recreated each time on reboot or is persistent. My guess is like /etc/profile it is recreated. In which case there wouldn't be a difference I guess between > and >> for /root/.profile. Would be a HUGE difference for /etc/profile  ::)

 

If /root/.profile was persistent between reboots, you'd end up with many many (1 for each reboot) duplicate lines for the added PATH statement

 

 

The root filesystem is loaded from bzroot into ram on ever reboot.

I only mentioned the write to vs append in the event a future version of unRAID puts something in that profile (alias or some other setting).

  • Author

The root filesystem is loaded from bzroot into ram on ever reboot.

I only mentioned the write to vs append in the event a future version of unRAID puts something in that profile (alias or some other setting).

 

Excellent point!!  I'll modify it to append ( >> ) instead of overwrite ( > )

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.