diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index ca76d6f..b7a0059 --- a/install.sh +++ b/install.sh @@ -1,25 +1,31 @@ #! /bin/bash # fact checking -PATH="$(pwd)" -USER="$(stat -c '%U' $PATH/lamapolldsgvo.desktop)" +PATH="$(/usr/bin/pwd)" +echo $PATH +USER="$(/usr/bin/stat -c '%U' $PATH/lamapolldsgvo.desktop)" +echo $USER # install .desktop file -install -m 644 $PATH/lamapolldsgvo.desktop -o root -g root /usr/share/applications/lamapolldsgvo.desktop - -#cp $PATH/lamapolldsgvo.desktop /usr/share/applications/lamapolldsgvo.desktop -#chown root:root /usr/share/applications/lamapolldsgvo.desktop -#chmod 644 /usr/share/applications/lamapolldsgvo.desktop +/usr/bin/install -m 644 $PATH/lamapolldsgvo.desktop -o root -g root /usr/share/applications/lamapolldsgvo.desktop # install actual script -install -m 775 $PATH/lamapoll-DSGVO.sh -o root -g root /usr/local/bin/lamapoll-DSGVO.sh - -#cp $PATH/lamapoll-DSGVO.sh /usr/local/bin/lamapoll-DSGVO.sh -#chown root:root /usr/local/bin/lamapoll-DSGVO.sh -#chmod 775 /usr/local/bin/lamapoll-DSGVO.sh +/usr/bin/install -m 775 $PATH/lamapoll-DSGVO.sh -o root -g root /usr/local/bin/lamapoll-DSGVO.sh # install link into start menu -sudo -u $USER "desktop-file-install --dir=/home/$USER/.local/share/applications /usr/share/applications/lamapoll-dsgvo.desktop" -sudo -u $USER "update-desktop-database -v ~/.local/share/applications" +/usr/bin/sudo -u $USER desktop-file-install --dir=/home/$USER/.local/share/applications /usr/share/applications/lamapolldsgvo.desktop +/usr/bin/sudo -u $USER update-desktop-database -v /home/$USER/.local/share/applications -echo "Installation done." \ No newline at end of file +echo "Installation done." + +/usr/bin/rm -f /tmp/api.keys 2>&1 >/dev/null +/usr/bin/touch /tmp/api.keys +/usr/bin/chown $USER:$USER /tmp/api.keys +MORE="y" +while [ $MORE == "y" ]; do + read -p "Bitte API Key eingeben: " API + API=${API:-} + echo $API >> /tmp/api.keys + read -p "Weitere API Keys eingeben? [y/N] " MORE + MORE=${MORE:-N} +done \ No newline at end of file diff --git a/lamapoll-DSGVO.sh b/lamapoll-DSGVO.sh index 7906b53..9c181ba 100644 --- a/lamapoll-DSGVO.sh +++ b/lamapoll-DSGVO.sh @@ -1,6 +1,6 @@ #! /bin/bash -file_path="/tmp/api.keys"h +file_path="/tmp/api.keys" if ! test -f $file_path; then echo "Keine API Keys gefunden. Bitte eine 'api.keys' Datei in /tmp/ ablegen"