e-nable / Service-Station

e-NABLE Handomatic Station Software
http://webapp.e-nable.me/
42 stars 24 forks source link

Upgrade issues due to my server setup #21

Open ErikDeBruijn opened 10 years ago

ErikDeBruijn commented 10 years ago

The instructions at raptorFollowupInstructions.txt are really good, as long as your setup is not like mine. I've been trying to upgrade the e-nable hand-o-matic over at e-nable.youmagine.com and it generates files, but my e-mail setup was different. I'm using postfix on this ubuntu system and it does come with the mail command, but it's apparently not entirely compatible with the usage in the shell scripts that get executed:

mail  -a 'Content-type: text/html' -a 'CC:enablematcher@gmail.com' -a 'From: e-NABLE' -s 'e-NABLE Model' erik@ultimaker.com < /var/code/Service-Station/ticket/2663516195-1015839576-3980356043/README.html

This returns just Content-type: text/html: No such file or directory in my case. This error was hard to find, I could get it by finding the shell script and executing that line myself. This is no objection to the code written!

I ended up fixing my setup by seeing what mailclient binary actually was used.

root@enable1:/var/www/html# sudo update-alternatives --display mailx
mailx - auto mode
  link currently points to /usr/bin/heirloom-mailx
/usr/bin/heirloom-mailx - priority 60
  slave Mail: /usr/bin/heirloom-mailx
  slave Mail.1.gz: /usr/share/man/man1/heirloom-mailx.1.gz
  slave mail: /usr/bin/heirloom-mailx
  slave mail.1.gz: /usr/share/man/man1/heirloom-mailx.1.gz
  slave mailx.1.gz: /usr/share/man/man1/heirloom-mailx.1.gz
/usr/bin/mail.mailutils - priority 30
  slave mail: /usr/bin/mail.mailutils
  slave mail.1.gz: /usr/share/man/man1/mail.mailutils.1.gz
  slave mailx.1.gz: /usr/share/man/man1/mail.mailutils.1.gz
Current 'best' version is '/usr/bin/heirloom-mailx'.

This was changed by the command sudo update-alternatives --config mailx

There are 2 choices for the alternative mailx (providing /usr/bin/mailx).

  Selection    Path                     Priority   Status
------------------------------------------------------------
* 0            /usr/bin/heirloom-mailx   60        auto mode
  1            /usr/bin/heirloom-mailx   60        manual mode
  2            /usr/bin/mail.mailutils   30        manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/mail.mailutils to provide /usr/bin/mailx (mailx) in manual mode

I have a few suggestions though, it would help if: