Category Tricks, Tips, or Hacks

Fix SickBeard “Pushbullet Notification Failed” Error

Attention: This content is 10 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

pushbeardGetting the “Pushbullet Notification Failed” error from your SickBeard notifications?  Well, the fix is simple, and here is what you have to do:

1) Find pushbullet.py in your SickBeard install directory.  For me, this file was located in:

/volume1/@appstore/sickbeard-custom/var/SickBeard/sickbeard/notifiers

2) Open that file in your editor of choice, for me that is vi, and make the following change:

Find:

if method == ‘POST’:
uri = ‘/api/pushes’
else:
uri = ‘/api/devices’

And change to:

if method == ‘POST’:
uri = ‘/v2/pushes’
else:
uri = ‘/api/devices’

Note that the devices uri doesn’t change, you just need to update the pushes uri.  I could dig in to the in’s and out’s of the Pushbullet API if I really felt like figuring out why this changed, but I don’t really care that much.  I just wanted to get my notifications working again.

3) Write and Quit the changes and then restart SickBeard.  This will recompile your changes in the python code and then hop in to your notifications and send a test message to make sure that worked.

That fixed it for me! Happy Pushbulleting 🙂

UPDATE 9/14/2014: Well, Something broke again.  I couldn’t figure out what (I think it has to do with the JSON body but I didn’t feel like rewriting something that’s been fixed elsewhere), so I snagged the latest pushbullet.py from the troubled SickRage project and used that instead.  Note, I had to switch the devices uri back to the /api/devices value because the /v2/devices value doesn’t work for me for some reason.  Hopefully this doesn’t break again :-\

Fix Synology Sickbeard Shortcut When Using https

Attention: This content is 11 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

sickbeardI have been working on getting SickBeard setup on my Synology DS1512+ NAS, and I’ve got pretty much everything worked out.  One of the final things I wanted to get working properly was https support with my self signed certificate I setup for my Synology.  I know, not really very important since I’ll only ever access it over my lan or via a VPN, but still… I went through the trouble of getting the self signed certificate working on my Synology, I wanted it to work here too.  It was a little tricky in a couple of regards.

First, I had to get it to use my certificate and key. I tried linking straight to the existing ones the Synology uses in /usr/syno/etc/ssl sub-directories but SickBeard just refused. I figured it was a permission issue since those certs were owned by root only. I decided the easiest way was to just copy over the 2 files I needed in to SickBeard’s directory and switch their owner:

Andromeda> cd /usr/syno/etc/ssl
Andromeda> cp ssl.crt/server.crt /usr/local/sickbeard-custom/var/server.crt
Andromeda> cp ssl.key/server.key /usr/local/sickbeard-custom/var/server.key
Andromeda> cd /usr/local/sickbeard-custom/var
Andromeda> chown sickbeard-custom server.crt
Andromeda> chown sickbeard-custom server.key

Then alas I was able to put in server.crt and server.key in SickBeard, restart it and it used my certs!  Woot!

I was pretty happy with myself until I clicked the SickBeard shortcut in the Synology menu and was greeted with my second issue:

The client sent a plain HTTP request, but this server only speaks HTTPS on this port.

Oh you son of a…

I’m way too anal about my things all working properly to live with that atrocity, so after a minute of poking around I quickly found the config for it the following file: /usr/local/sickbeard-custom/app/config

Pop that file open in vi and change the protocol line from http to https.  Save and quit, then simply reload your Synology web interface, and bam! Your shortcut will work once again, launching Sickbeard via https! Yay!

sbshortcut

Defeat the SJ-R’s Paywall with Chrome in 4 seconds

Attention: This content is 12 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

Print is dead.  You hear me SJ-R?

Central Illinois’ newspaper – The State Journal Register – was bought up by media conglomerate GateHouse Media back in 2006.  Since then the paper has been on a wildly out of control downward spiral.

GateHouse media’s latest “innovation” in the digital age is… wait for it…

A PAYWALL!

Jesus GateHouse… seriously?  It is the year 2013, and you think a Paywall is the way to move your business FORWARD?  Have you learned nothing from your bigger brothers like The Times which lost over 4 million readers back in 2010 thanks to their paywall?  Just as with TV Shows or Movies, if someone doesn’t want to pay for your media, they will simply not pay.  Trying to trick the user in to consuming the media how you think it should be consumed will never bring in money.  You will simply drive previous viewers away from you and to other services that remain free.

Your draconian thinking of what media is and how it should be consumed will be the end of you.

I was quite miffed today when I tried to read an article a friend had linked on Facebook and I was presented with this Paywall pop-up.  Clicking the X redirects you to the main page.  This really got on my nerves as all of the content was right there, sitting behind a cheezy looking pop up box.  How stupid.  So, I spent exactly 4 seconds, reloaded the web page, and read the content as it should be consumed.  For free.

I thought I should share my tip with others who may not be aware of this pretty nifty feature in Chrome.  You can selectively disable javascript on any website you visit.  Most sites use javascript for good… but some sites, like the SJ-R site, uses javascript for evil.

Read More

Forcing sendmail to use a different port for outgoing mail

Attention: This content is 12 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

In the world of Linux (specifically CentOS 5 in this case) sendmail is a very useful utility.  It is what allows linux to send email to regular ole mail servers.  But, if you’re reading this, you likely know that.

Typically sendmail uses standard SMTP port 25 to do its business.  In most cases, this works fine as is, but more and more now I am seeing ISP’s block port 25 and leave the customer with no recourse (coughAT&Tcough).  This makes it particularly difficult for sendmail to do its thing since it is supposed to work on port 25.

The simplest solution is to reconfigure sendmail to send out on a port other than 25.  The only catch-22 here is that the mail server must accept mail on that port as well.  Now, I’ve already set that up using iptables with a simple REDIRECT function and tested to make sure my CentOS box can communicate to it on that port using telnet, so I’m not going to get in to that, as anyone can forward a port).

Read More

Tricky php.ini settings

Attention: This content is 13 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

There are several ways PHP settings can be adjusted.  The 2 most common are in the Apache config file, or usually, the php.ini file.

Typically you can use phpinfo(); to get the php settings.  This is extremely useful as it also shows EXACTLY which php.ini file is being used to pull its configuration from.

I recently ran in to a particularly frustrating situation trying to adjust the settings.  I had already grep’ed throughall the Apache config files and knew there were no php configuration settings hidden in there.  So, I knew it was pulling its config from the php file.  In the past it has been a simple matter to adjust the value in the ini file and then reload Apache (this causes php to reload).  Well, this time it wasn’t working.  No matter how many times I killed Apache’s processes and restarted it, it was STILL pulling the old values.

I was really about to lose my mind when I ran the phpinfo via the php cli, and it showed my new correct values!  Arggg!!!

After a shamefully long amount of time trying to figure this out, I FINALLY found the solution.  Well, unbeknownst to me, this server was using something call php-fpm.  Php-fpm is a FastCGI Process Manager, which is an alternative to PHP FastCGI (which if was being used would have also hung me up).  This basically spawns php in a separate service to allow it to work faster.  Well, since php is basically its own process, you have to restart the php-fpm service to get Apache’s PHP to reload the config file!

[root@myserver php53]# /etc/init.d/php-fpm restart
Gracefully shutting down php-fpm . done
Starting php-fpm done

And bam, I finally got the new settings to load!  Note, if you’re using the standard FastCGI module you’d use php-fastcgi restart instead.

I feel silly for not knowing about this php-fpm process before… but I’m used to Apache just calling php directly itself.  This was a set up I had not dealt with before, so it was time for me to learn something new.

Happy PHP’ing folks!

Fix 7’s Taskbar Right Clicking

Attention: This content is 13 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

Something that has bugged me for a long time in Windows 7 is how the taskbar right-click functionality was changed.  Since Windows 95, when you right clicked on an item in the taskbar, you were presented with a menu to Restore, Minimize, Maximize, Close, and with some programs, some nifty custom options (like PuTTY’s custom menu, which since I use it  a lot, is the main source of my gripes here).

But, for some reason in Windows 7, Microsoft decided to do away with all of that and change what the right click does.  Right clicking now brings up Windows 7’s jump lists.  A feature that is absolutely worthless to a good 95% of the programs that run on Windows.  It was so incredibly frustrating to me to right click on running program and not be presenting with a useful menu, and right clicking on the program name in the jump list presenting you with an equally worthless menu.  Even more frustrating was there is an alternate way to access jumplists, by clicking and dragging up, they didn’t have to change the right click functionality!  The final straw was when they (as usual) gave you no setting to change this option back to the classic right click menu.  Now, I realize you can hold the Shift key and right click on a taskbar item to get the classic menu, but I want that to be the default function, not something that his hidden behind the shift key.

Well, as you may have guessed, I have a fix for this.  A little free program called 7 Taskbar Tweaker.  This program will let you change the right click function back to the classic menu (and a slew of other tweaks)!  And even more so, if you do use jump lists for something, you can still access them by the other method of clicking and dragging up like I mentioned above.  The only slight downside is that the program must run in the system tray for the changes to remain in effect as it actually has to inject a dll and hook in to the explorer process since there are no registry options for the tweaks it applies.  Fortunately, the memory footprint is fairly small, clocking in at only around 2mb of ram used, so it’s not going to have an adverse effect on systems, even those with only a couple gigs of ram.

So, you can change this:

 

Back in to something useful:

Windows 7 SP1 is out, time to get back some HD space

Attention: This content is 14 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

Well, it’s that time of the season again where Microsoft pushes out a new service pack.  This time it is Service Pack 1 for Windows 7.  I have actually been running SP1 for a few weeks now (yay for developer’s releases) on 3 different machines, all with zero problems.  The install is smooth and the service pack didn’t cause any issues.

As with the service packs for Windows Vista, there is a command you can run for your command line that basically permanently installs the service pack files on your machine (by removing all of the backup files it makes during install).   I previously showed you how to do this for Vista SP1 and Vista SP2, so now it is 7 SP1’s turn.

Also, as with previous SP release, Microsoft has once again changed the command to make this happen.  I’m not sure why they always want to make you play guess-the-command, but I did the research for you, and here it is.  Run this at an Administrator command prompt:

dism /online /cleanup-image /spsuperseded

It will take a few minutes to run and do its thing, but once it is finished you will get back around 1.3gb to 1.5gb of space.  Not bad for running 1 command at the command line!  Just remember, this command does make the service pack install permanent, so there is no reverting after this, but honestly, once you have booted a few times and everything works fine, there is really no reason to ever want to revert.

So go claim back your space!

A new rootkit?

Attention: This content is 14 years old. Please keep its age in mind while reading as its contents may now be outdated or inaccurate.

For the third time in the last few weeks I have had to clean up yet another malware infection.

However, these have all displayed similar symptoms, and I am thinking there might be another outbreak of malware coming.  I have noticed that malware seems to come in waves.  I will spend a whole bunch of time cleaning it up for a while, then I will go months with out having to clean any up… then it’ll come back in force again.

I’m not sure of the injection vector of the latest version (the previous wave seemed to enjoy Java exploits quite a lot), but I can give you a fairly obvious and quick to diagnose symptom and a quick way to clean it up.

The first and easiest check on an infected machine is try and visit http://windowsupdate.microsoft.com.  On the machines I have seen, regular websites will work like cnn.com or google.com, but you can not get to the Windows Update site.  It will just snap to a page not found error.

The second easy check basically confirms that Windows Updates are being blocked.  Hop in to the Event Viewer, and look in the Application log.  You should see a whole onslaught of errors from crypt32 complaining that it “Failed auto update retrieval of third-part root list sequence number from…The connection with the server was terminated abnormally”.  This is almost a guaranteed sign you’ve picked yourself up some new malware, and more specifically a rootkit.  This rootkit is sort of nasty in that it makes you think you have got the machine all cleaned up.  If you run a Malwarebytes Antimalware scan the scan will come back clean, and the system will seem normal (aside from the errors in Event Viewer and not being able to get to Windows Updates).

Read More