blob: b649c2605844a16d7322bc2ed2bb275bfc17229e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
create_user() {
getent passwd monero &>/dev/null || {
echo -n ">>> Creating monero user... "
useradd --system --user-group -m --home /var/lib/monero monero
echo "done"
} # NOTE: we do not autoremove user due to security concerns (Arch policy)
mkdir -p /var/log/monero && chown monero:monero /var/log/monero
}
post_install() {
create_user
}
post_upgrade() {
create_user
echo ">>> NOTICE: Package changed location of data dir (again! rebranding)."
echo ">>> Please move your monero data dir to new location "
echo ">>> before starting daemon systemd service:"
echo ">>> sudo mv /var/lib/bitmonero /var/lib/monero/"
echo ">>> sudo chown -R monero:monero /var/lib/monero/"
}
|