Add user when installing
This commit is contained in:
parent
a9a08e656f
commit
cc55b3e1d1
7
debian/postinst
vendored
7
debian/postinst
vendored
@ -1,8 +1,13 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
id -u soundfx &>/dev/null || useradd -r -M soundfx
|
||||||
|
|
||||||
if [ ! -f /etc/soundfx-rs/config.env ]; then
|
if [ ! -f /etc/soundfx-rs/config.env ]; then
|
||||||
cp /etc/soundfx-rs/default.env /etc/soundfx-rs/config.env
|
cp /etc/soundfx-rs/default.env /etc/soundfx-rs/config.env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chown soundfx /etc/soundfx-rs/config.env
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
11
debian/postrm
vendored
Normal file
11
debian/postrm
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
id -u soundfx &>/dev/null || userdel soundfx
|
||||||
|
|
||||||
|
if [ -f /etc/soundfx-rs/config.env ]; then
|
||||||
|
rm /etc/soundfx/config.env
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
@ -2,6 +2,7 @@
|
|||||||
Description=Discord bot for custom sound effects and soundboards
|
Description=Discord bot for custom sound effects and soundboards
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
User=soundfx
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/soundfx-rs
|
ExecStart=/usr/bin/soundfx-rs
|
||||||
WorkingDirectory=/etc/soundfx-rs
|
WorkingDirectory=/etc/soundfx-rs
|
||||||
|
Loading…
Reference in New Issue
Block a user