add debian building. add asset compile and embedding. other fixes.
This commit is contained in:
8
debian/ROOT/DEBIAN/control
vendored
Normal file
8
debian/ROOT/DEBIAN/control
vendored
Normal 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
17
debian/ROOT/DEBIAN/postinst
vendored
Executable 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
20
debian/ROOT/DEBIAN/postrm
vendored
Executable 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
20
debian/ROOT/DEBIAN/preinst
vendored
Executable 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
14
debian/ROOT/DEBIAN/prerm
vendored
Executable 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
|
||||
|
||||
|
||||
4
debian/ROOT/etc/opt/sour.is/paste/config.toml-example
vendored
Normal file
4
debian/ROOT/etc/opt/sour.is/paste/config.toml-example
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
[http]
|
||||
listen = ":9010"
|
||||
|
||||
|
||||
16
debian/ROOT/lib/systemd/system/sour.is-paste.service
vendored
Normal file
16
debian/ROOT/lib/systemd/system/sour.is-paste.service
vendored
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user