Use conffiles

This commit is contained in:
jude 2023-06-17 12:49:01 +01:00
parent 16be7a328e
commit 88cfb829e3
3 changed files with 8 additions and 14 deletions

View File

@ -40,12 +40,16 @@ suggests = "mysql-server-8.0, nginx"
maintainer-scripts = "debian"
assets = [
["target/release/reminder-rs", "usr/bin/reminder-rs", "755"],
["conf/default.env", "etc/reminder-rs/default.env", "600"],
["conf/default.env", "etc/reminder-rs/config.env", "600"],
["conf/Rocket.toml", "etc/reminder-rs/Rocket.toml", "600"],
["web/static/**/*", "lib/reminder-rs/static", "666"],
["web/templates/**/*", "lib/reminder-rs/templates", "666"],
["web/static/**/*", "lib/reminder-rs/static", "644"],
["web/templates/**/*", "lib/reminder-rs/templates", "644"],
# ["nginx/reminder-rs", "etc/nginx/sites-available/reminder-rs", "755"]
]
conf-files = [
"/etc/reminder-rs/config.env",
"/etc/reminder-rs/Rocket.toml",
]
[package.metadata.deb.systemd-units]
unit-scripts = "systemd"

8
debian/postinst vendored
View File

@ -4,12 +4,6 @@ set -e
id -u reminder &>/dev/null || useradd -r -M reminder
if [ ! -f '/etc/reminder-rs/config.env' ]; then
echo "Copying configuration file..."
cp /etc/reminder-rs/default.env /etc/reminder-rs/config.env
fi
chown reminder /etc/reminder-rs/config.env
chown reminder /etc/reminder-rs/Rocket.toml
chown -R reminder /etc/reminder-rs
#DEBHELPER#

4
debian/postrm vendored
View File

@ -4,8 +4,4 @@ set -e
id -u reminder &>/dev/null || userdel reminder
if [ -f '/etc/reminder-rs/config.env' ]; then
rm /etc/reminder-rs/config.env
fi
#DEBHELPER#