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.

Package creation - help

Featured Replies

Hi All,

 

Is it possible for me to create a package that moves and replaces files that are already there? Eg, template.php. I know I can create a slackware package that installs files to /usr/#$#$/34#sdf/, but is it smart enough to move files too?

 

Cheers

 

 

You can code up your own install/doinst.sh to do whatever you want upon installation. If you do not want to replace files, then you will need to have your files named differently inside your package and also have your install script decide what to do.

 

For instance, what my packages do is copy certain files over to "filename.new" if it determines the files are different ["filename" and "filename.new"] and then indicates to the user to examine the files to make the appropriate changes as they see fit. If the files are identical then it doesn't copy over the "filename.new". This is vital to do for any/all of the /etc/rc.d/rc.* type of files.

 

Here is the portion of my "install/doins.sh" for dealing with the /etc/rc.d/rc.local.new file.

 

config() {
  NEW="$1"
  OLD="`dirname $NEW`/`basename $NEW .new`"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}

# deal with rc.local
if [ -r etc/rc.d/rc.local -a -r etc/rc.d/rc.local.new ]; then
  chmod --reference etc/rc.d/rc.local etc/rc.d/rc.local.new
fi
config etc/rc.d/rc.local.new

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.