Added step in makefile to make the i2pd executable belong to the _i2pd user and group

このコミットが含まれているのは:
Al Pou 2022-05-24 21:45:31 -04:00
コミット 53d06b5cf9
1個のファイルの変更11行の追加0行の削除

ファイルの表示

@ -37,6 +37,12 @@ install:
chown -R _i2pd:_i2pd /var/lib/i2pd; \
fi
# These commands make the i2pd executable belong to the _i2pd user and
# group, and make it non-writable for all and non-executable for others.
@echo "Giving ownership of i2pd to _i2pd"
@chown _i2pd:_i2pd $$(which i2pd)
@chmod 550 $$(which i2pd)
# This command copies the RC script in the RC script folder to allow I2Pd to
# be managed by the service supervisor.
@echo "Installing i2pd service"
@ -50,6 +56,11 @@ uninstall:
@rcctl disable i2pd
@rm -f /etc/rc.d/i2pd
# These commands restore the ownership and permissions of i2pd.
@echo "Giving ownership of i2pd back to root"
@chown root:wheel $$(which i2pd)
@chmod 755 $$(which i2pd)
# This command removes the _i2pd user and its home if they exist.
@if userinfo -e _i2pd; then \
echo "Removing _i2pd user"; \