Fixing push notifications for the Facebook app on iOS

Every now and again, push notifications would stop working on the Facebook app on my iPhone.

Previously I had completely removed and re-installed the app and that fixed the problem, but i’ve discovered an easier and quicker way to fix them up.

  1. Go into Settings.
  2. Tap on Facebook.
  3. Tap on Push Notifications.
  4. Turn all the sliders off.
  5. Go back a screen.
  6. Tap on Push Notifications again.
  7. Turn the features you want notifications for back on.
  8. Go back a screen.

I did get a bit paranoid and exited the push notification settings after turning them off then went back in as i’m not sure if the settings are saved immediately or not. That fixed it for me. I hope it does the same for you too.

Let me know if this helps.

Mounting an IBM XiV LUN onto a RHEL v5 host without installing the HAK

There are two methods of doing this. The first is installing the IBM Host Attachment Kit (HAK). This makes mounting any LUNS from the XiV dead easy, but isn’t what this article is about.

Installing the HAK will blow away your multipath.conf and any changes you might have made to it. What if you wanted to mount the LUN without installing the HAK? What if you wanted to mount LUNs from two different SANs?

This is where manually modifying multipath.conf comes in. I’m documenting the changes that the HAK made to multipath.conf so you don’t need to install it.

blacklist {
    device {
        vendor "IBM-ESXS"
    }
    device {
        vendor "LSILOGIC"
    }
    device {
        vendor "ATA"
    }
    device {
        vendor "VMware"
    }
    devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
    devnode "^hd[a-z]"
    devnode "^cciss!c[0-9]d[0-9]*"
}
devices {
    device {
        path_checker tur
        product "2810XIV"
        vendor "IBM"
        rr_min_io 15
        path_grouping_policy multibus
        path_selector "round-robin 0"
        no_path_retry queue
        failback 15
    }
}
defaults {
    user_friendly_names yes
}

Pick and choose which bits you want to copy into your multipath.conf, the most important part being the devices stanza of the above config.

Since user_friendly_names is set to yes, this will give the device a name of /dev/mapper/mpathx. But if you don’t don’t like this you can name it whatever you want. To do this, find the wwid of the multipath device with “multipath -l”, then put this into your multipath.conf. Example below:

multipaths {
        multipath {
                wwid    3600507680193818250000000000001e9
                alias   mymount1
        }
        multipath {
                wwid    3600507680193818250000000000001ea
                alias   mymount2
        }
}

Your multipath device (LUN) will then be available as /dev/mapper/mymount1 and /dev/mapper/mymount2.

Merging Plesk subscriptions

This article could have been called “Merging domains from one subscription to another” or “Moving domains between subscriptions”. But its goal remains the same. If you’re arrived at this page then you probably already know what you’re looking for.

With the business model change from Plesk 9 to Plesk 10, the upgrader splits each customer’s domains into it’s own subscription. Highly annoying if you want to keep track of a clients overall usage. What most Plesk users want is to merge all of a client’s subscriptions into a single subscription containing multiple domains, now possible with Plesk 10. Each client’s subscription consists of a “master domain”. Other domains can then be added to the subscription.

When asked, Parallels forum representatives have been dodging the issue since Plesk 10′s release, so there has to this day been no official way of merging subscriptions. The manual method seemed the only way.

What i’ve done is created a script to automate this for you. It’s been floating in my head for months but I finally got the motivation to sit down and put it together. Its not a complicated script and i’m not sure why Parallels haven’t done something similar.

This is what it does (currently) at a high level:

  1. Changes the database ownership of all the DB’s of the old domain to the new subscription.
  2. Backs up the files in the www root of the domain to be migrated.
  3. Backs up all mailboxes associated with the domain to be migrated.
  4. Gets a list of all the email accounts and associated passwords and dumps it to a file for use in a later step.
  5. Removes the old subscription.
  6. Re-creates the domain under the desired subscription.
  7. Reads in the email account list and recreates the mail accounts.
  8. Restores the files from the old domains www root.
  9. Restores the mailboxes.

I’ve tried to write this script so that it should work on most if not all Plesk supported Linux distributions. Sorry Windows folks! Nothing personal. It does make changes to the psa database directly so I would highly suggest backing up your psa database first. Although i’ve been using this script myself, i’d test it on your systems first on a dummy domain.

Once the script finishes executing, check the ownerships of the files in the new wwwroot as you’ll probably need to fix these before the site will work.

Here’s what it currently doesn’t handle:

  • DNS zones with modified entries. Use this script for domains with pretty much unmodified zones from your template, or take note of the changes you made manually and recreate them after the domain has been recreated. I have not yet found an easy way to dump the zone details of the domains and recreate them in an automated fashion.
  • Mailing lists. I personally don’t use the mailing lists so I haven’t included that yet.

This is only a version 1 so i’d love to hear your feedback and comments, even if you don’t find it useful, and especially if you DO. Also if you do end up making improvements, please let me know so that I can merge them into the script for the benefit of others.

Download

Changelog

  • v1.0 – Initial release.
  • v1.1 – Fixed bug with emaillist output file.