保留Debian软件包中的Linuxfunction

我正在构build一个包含需要侦听端口443的Web服务的包。服务本身是用Go编写的,所以我不能使用authbind来pipe理端口权限。 相反,我select使用setcap:

me@buildbox $ setcap CAP_NET_BIND_SERVICE=+eip opt/myservice/myservice me@buildbox $ getcap opt/myservice/myservice opt/myservice/myservice = cap_net_bind_service+eip 

但是,当我在我的服务器上安装软件包时,此function不会被保留。

 me@myserver $ apt-get install myservice ... # installs normally ... me@myserver $ getcap /opt/myservice/myservice me@myserver $ # ^ No output == no capabilities 

我真的不希望这个服务以超级用户的身份运行,但是在安装软件包的时候遇到了麻烦。 我能以某种方式在debian软件包中设置function吗? 是否有另一种方法可以达到所需的最终结果(服务可以绑定到端口443,但不能以root身份运行)。