Use conffiles
This commit is contained in:
parent
16be7a328e
commit
88cfb829e3
10
Cargo.toml
10
Cargo.toml
@ -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
8
debian/postinst
vendored
@ -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
4
debian/postrm
vendored
@ -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#
|
||||
|
Loading…
Reference in New Issue
Block a user