fix systemd service

This commit is contained in:
idk
2023-01-04 03:37:32 +00:00
parent 77e5e43b0f
commit fa142b976f
4 changed files with 7 additions and 7 deletions

View File

@ -56,8 +56,8 @@ install:
install -g i2psvc -o i2psvc -d /var/lib/i2p/i2p-config/reseed/ install -g i2psvc -o i2psvc -d /var/lib/i2p/i2p-config/reseed/
cp -r content /var/lib/i2p/i2p-config/reseed/content cp -r content /var/lib/i2p/i2p-config/reseed/content
chown -R i2psvc:i2psvc /var/lib/i2p/i2p-config/reseed/ chown -R i2psvc:i2psvc /var/lib/i2p/i2p-config/reseed/
install -m644 etc/systemd/system/reseed.service.d/reseed.conf /etc/systemd/system/reseed.service.d/reseed.conf install -m644 etc/systemd/system/reseed.service.d/override.conf /etc/systemd/system/reseed.service.d/override.conf
install -m644 etc/systemd/system/reseed.service.d/reseed.service /etc/systemd/system/reseed.service.d/reseed.service install -m644 etc/systemd/system/reseed.service.d/reseed.service /etc/systemd/system/reseed.service
uninstall: uninstall:
rm /usr/bin/reseed-tools rm /usr/bin/reseed-tools

View File

@ -12,7 +12,7 @@ Environment=\"RESEED_EMAIL="
RESEED_DEFAULT="#Edit the contact/signing email used by your reseed server here RESEED_DEFAULT="#Edit the contact/signing email used by your reseed server here
export RESEED_EMAIL=\"" export RESEED_EMAIL=\""
mkdir -p /etc/systemd/system/reseed.d/ mkdir -p /etc/systemd/system/reseed.service.d/
INIT=$(file /sbin/init 2>&1 | grep systemd) INIT=$(file /sbin/init 2>&1 | grep systemd)
if [ ! -z "$INIT" ]; then if [ ! -z "$INIT" ]; then
@ -23,7 +23,7 @@ if [ -t 1 ] ; then
if [ -f /usr/bin/whiptail ]; then if [ -f /usr/bin/whiptail ]; then
RESEED_EMAIL=$(whiptail --inputbox "$RESEED_MESSAGE" 10 30 3>&1 1>&2 2>&3) RESEED_EMAIL=$(whiptail --inputbox "$RESEED_MESSAGE" 10 30 3>&1 1>&2 2>&3)
if [ ! -z "$INIT" ]; then if [ ! -z "$INIT" ]; then
echo "$RESEED_CONF$RESEED_EMAIL\"" | tee /etc/systemd/system/reseed.d/reseed.conf echo "$RESEED_CONF$RESEED_EMAIL\"" | tee /etc/systemd/system/reseed.service.d/override.conf
systemctl enable reseed.service systemctl enable reseed.service
systemctl daemon-reload systemctl daemon-reload
else else
@ -35,8 +35,8 @@ else
if [ -f /usr/bin/zenity ]; then if [ -f /usr/bin/zenity ]; then
RESEED_EMAIL=$(zenity --entry --title "Reseed Configuration" --text "$RESEED_MESSAGE" 10 30 3>&1 1>&2 2>&3) RESEED_EMAIL=$(zenity --entry --title "Reseed Configuration" --text "$RESEED_MESSAGE" 10 30 3>&1 1>&2 2>&3)
if [ ! -z "$INIT" ]; then if [ ! -z "$INIT" ]; then
echo "$RESEED_CONF$RESEED_EMAIL\"" | tee /etc/systemd/system/reseed.d/reseed.conf echo "$RESEED_CONF$RESEED_EMAIL\"" | tee /etc/systemd/system/reseed.service.d/override.conf
#systemctl enable /etc/systemd/system/reseed.d/reseed.service #systemctl enable /etc/systemd/system/reseed.service.d/reseed.service
systemctl enable reseed.service systemctl enable reseed.service
systemctl daemon-reload systemctl daemon-reload
else else

View File

@ -2,7 +2,7 @@
INIT=$(file /sbin/init 2>&1 | grep systemd) INIT=$(file /sbin/init 2>&1 | grep systemd)
if [ ! -z "$INIT" ]; then if [ ! -z "$INIT" ]; then
systemctl disable /etc/systemd/system/reseed.service systemctl disable reseed.service
systemctl daemon-reload systemctl daemon-reload
fi fi