sbt/sbt-native-packager — pull request #348 by muuki88 (2014-09-11 18:07:12+00:00)
Title: Wip/bashscript refactoring

This is a major refactoring of the bash-script-creation parts.

## Main Goals

- Reuse more bash scripts instead of copying around
- Try to consolidate rpm and debian script handling
- Separate `archetypes` and `standard` bash scripts

### Reusable bash snippets

To reuse more bash scripts every reusable part is stored inside the `linuxScriptReplacements`.
The `linuxScriptReplacements` are scoped, so we can provide some parts only for `Debian`
or `Rpm`. One of the default debian scripts now looks like this

```bash
${{header}}
${{control-functions}}

addGroup ${{daemon_group}}
addUser ${{daemon_user}} ${{daemon_group}} "${{app_name}} daemon-user" ${{daemon_shell}}

${{chown-paths}}
```

The `control-functions` define methods for user/group creation/deletion which work
on most linux distributions.

### Consolidate rpm and debian

- For the `java_server` archetype the controlscripts are now name like the debian. See the _scriptlets-override-rpm_ test for details.
- Default bash scripts are now loaded via `/-template`, e.g. `debian/postinst-template`
- `DebianPlugin` has now less magic (like rpm). Only the `daemon_user` and `daemon_group` will be generated. The chown commands are now generated by `debianMakeChownReplacements` and added to the `linuxScriptReplacements in Debian`

### Archetype Bashscripts

Bash scripts for a specified archetype are now placed in `////