debian: put binaries in sbin, libexec
builder-db and builder-migrations require privileges, and builder-web is expected to be run from systemd.
This commit is contained in:
parent
66a9d293e6
commit
bac3b3c64b
2 changed files with 7 additions and 6 deletions
|
@ -6,7 +6,7 @@ After=syslog.target network.target
|
|||
Type=simple
|
||||
User=builder
|
||||
Group=builder
|
||||
ExecStart=/usr/bin/builder-web
|
||||
ExecStart=/usr/libexec/builder-web
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -11,18 +11,19 @@ basedir=$(realpath "$(dirname "$0")"/../..)
|
|||
bdir=$basedir/_build/install/default/bin
|
||||
tmpd=$basedir/_build/stage
|
||||
rootdir=$tmpd/rootdir
|
||||
bindir=$rootdir/usr/bin
|
||||
sbindir=$rootdir/usr/sbin
|
||||
systemddir=$rootdir/usr/lib/systemd/system
|
||||
debiandir=$rootdir/DEBIAN
|
||||
libexecdir=$rootdir/usr/libexec
|
||||
|
||||
trap 'rm -rf $tmpd' 0 INT EXIT
|
||||
|
||||
mkdir -p "$bindir" "$debiandir" "$systemddir"
|
||||
mkdir -p "$sbindir" "$debiandir" "$systemddir" "$libexecdir"
|
||||
|
||||
# stage app binaries
|
||||
install $bdir/builder-web $bindir/builder-web
|
||||
install $bdir/builder-migrations $bindir/builder-migrations
|
||||
install $bdir/builder-db $bindir/builder-db
|
||||
install "$bdir/builder-web" "$libexecdir/builder-web"
|
||||
install "$bdir/builder-migrations" "$sbindir/builder-migrations"
|
||||
install "$bdir/builder-db" "$sbindir/builder-db"
|
||||
|
||||
# service script
|
||||
install -m 0644 $basedir/packaging/debian/builder-web.service $systemddir/builder-web.service
|
||||
|
|
Loading…
Reference in a new issue