scala - sbt native packager and app writable directory -
using sbt-native-packager plugin, what's best approach have app-writable directory? in configuration use enableplugins(javaserverapppackaging, systemdplugin, debianplugin, universalplugin)
, works except app needs write files own functioning, under /usr/share/package-name/ sounds wrong wonder , how best that, if should use debain postinst scripts of try alter directory permissions mappings of universal pluin.
adding new writeable directory in linux distribution means adding mapping linuxpackagemappings
(documentation).
linuxpackagemappings += packagetemplatemapping( s"/opt/${(packagename in linux).value}" )().withuser((daemonuser in linux).value) .withgroup((daemongroup in linux).value) .withperms("755")
you can see old sbt syntax in use javaserverapp plugin.
note: should not set /usr/share/<packagename>
directory writeable. contains executables , config files , should modifiable root user.
cheers, muki
Comments
Post a Comment