add debian building. add asset compile and embedding. other fixes.

This commit is contained in:
xuu
2017-04-24 09:20:46 -06:00
parent 8e6da6cd30
commit db6d5afb09
33 changed files with 610 additions and 2244 deletions

8
debian/ROOT/DEBIAN/control vendored Normal file
View File

@@ -0,0 +1,8 @@
Package: sour.is-paste
Version: 2.0.0-1
Section: base
Priority: optional
Architecture: amd64
Maintainer: xuu <me@sour.is>
Description: Encrypted Paste Store
API and UI for storing encrypted pastes.

17
debian/ROOT/DEBIAN/postinst vendored Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -e
case "$1" in
configure)
systemctl daemon-reload
if systemctl is-enabled sour.is-paste.service; then
systemctl start sour.is-paste.service
fi
sudo chown -R root:root /opt/sour.is
sudo chown -R root:root /etc/opt/sour.is
;;
esac
exit 0

20
debian/ROOT/DEBIAN/postrm vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
set -e
case "$1" in
remove)
if systemctl is-active sour.is-paste.service; then
systemctl stop sour.is-paste.service
fi
;;
purge)
if systemctl is-enabled sour.is-paste.service; then
systemctl disable sour.is-paste.service
fi
;;
esac
exit 0

20
debian/ROOT/DEBIAN/preinst vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
set -e
case "$1" in
install)
# do some magic
;;
upgrade|abort-upgrade)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
#DEBHELPER#
exit 0

14
debian/ROOT/DEBIAN/prerm vendored Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
set -e
case "$1" in
remove|upgrade)
if systemctl is-active sour.is-paste.service; then
systemctl stop sour.is-paste.service
fi
;;
esac
exit 0

View File

@@ -0,0 +1,4 @@
[http]
listen = ":9010"

View File

@@ -0,0 +1,16 @@
[Unit]
Description=sour.is paste API
After=syslog.target network.target
[Service]
Type=simple
User=www-data
WorkingDirectory=/opt/sour.is/
ExecStart=/opt/sour.is/bin/paste serve
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target