Skip to content

Commit

Permalink
Revert "Debian/Ubuntu: use non-root evcc user (evcc-io#4901)"
Browse files Browse the repository at this point in the history
This reverts commit 5fef68d.
  • Loading branch information
andig committed Feb 6, 2023
1 parent e6b0686 commit b06eae9
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 96 deletions.
1 change: 0 additions & 1 deletion .goreleaser-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ nfpms:
dst: /lib/systemd/system/evcc.service

scripts:
preinstall: ./packaging/scripts/preinstall.sh
postinstall: ./packaging/scripts/postinstall.sh
preremove: ./packaging/scripts/preremove.sh
postremove: ./packaging/scripts/postremove.sh
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ nfpms:
dst: /lib/systemd/system/evcc.service

scripts:
preinstall: ./packaging/scripts/preinstall.sh
postinstall: ./packaging/scripts/postinstall.sh
preremove: ./packaging/scripts/preremove.sh
postremove: ./packaging/scripts/postremove.sh
Expand Down
5 changes: 1 addition & 4 deletions packaging/init/evcc.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ StartLimitIntervalSec=10
StartLimitBurst=10

[Service]
ExecStart=/usr/bin/evcc --sqlite /var/lib/evcc/evcc.db
ExecStart=/usr/bin/evcc
Restart=always
RestartSec=10

User=evcc
Group=evcc

[Install]
WantedBy=multi-user.target
6 changes: 1 addition & 5 deletions packaging/scripts/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e
USER_CHOICE_CONFIG="/etc/evcc-userchoices.sh"
ETC_SERVICE="/etc/systemd/system/evcc.service"
USR_LOCAL_BIN="/usr/local/bin/evcc"
RESTART_FLAG_FILE=/var/lib/evcc/.restartOnUpgrade

# Usage: askUserKeepFile <file>
# Return: 1 = keep, 0 = delete
Expand Down Expand Up @@ -89,10 +88,7 @@ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-decon
# Restart only if it was already started
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if [ -f $RESTART_FLAG_FILE ]; then
deb-systemd-invoke start evcc.service >/dev/null || true
rm $RESTART_FLAG_FILE
elif [ -n "$2" ]; then
if [ -n "$2" ]; then
deb-systemd-invoke try-restart evcc.service >/dev/null || true
else
deb-systemd-invoke start evcc.service >/dev/null || true
Expand Down
85 changes: 0 additions & 85 deletions packaging/scripts/preinstall.sh

This file was deleted.

0 comments on commit b06eae9

Please sign in to comment.