-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a bunch of stuff and reduce logs
- Loading branch information
1 parent
303ad26
commit 3c776dc
Showing
14 changed files
with
61 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,28 @@ | ||
echo "=== Desktop shortcuts ===" | ||
mkdir -p /home/$MISO_USERNAME/.config/WEEE\ Open | ||
sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/WEEE\ Open | ||
for file in ./desktop/*.desktop; do | ||
sudo -u $MISO_USERNAME cp $file /home/$MISO_USERNAME/Desktop | ||
file=$(basename -s .desktop $file) | ||
sudo -u $MISO_USERNAME cp ./img/$file.png /home/$MISO_USERNAME/.config/WEEE\ Open/ | ||
sudo -u $MISO_USERNAME chmod +x /home/$MISO_USERNAME/Desktop/$file.desktop | ||
f=/home/$MISO_USERNAME/Desktop/$file.desktop | ||
gio set -t string $f metadata::xfce-exe-checksum "$(sha256sum $f | awk '{print $1}')" | ||
#su - $MISO_USERNAME -c "gio set -t string /home/$MISO_USERNAME/Desktop/Tarallo.desktop metadata::xfce-exe-checksum $(sha256sum /home/$MISO_USERNAME/Desktop/Tarallo.desktop | awk '{print $1}')" | ||
done | ||
sudo tee /home/$MISO_USERNAME/.config/autostart/trust_desktop_shortcuts.dekstop <<EOF >/dev/null | ||
[Desktop Entry] | ||
Encoding=UTF-8 | ||
Version=1.0 | ||
Type=Application | ||
Name=Trust Desktop Shortcuts | ||
Comment=Automatically trust all the .desktop files on the desktop | ||
Exec=for file in *.desktop; do gio set -t string \$file metadata::xfce-exe-checksum "\$(sha256sum \$file | awk '{print \$1}')"; done | ||
Path=/home/$MISO_USERNAME/Desktop/ | ||
OnlyShowIn=XFCE; | ||
StartupNotify=false | ||
Terminal=false | ||
Hidden=false | ||
EOF | ||
#sudo tee /etc/cron.d/desktop_shortcuts <<EOF >/dev/null | ||
#@reboot weee for file in /home/$MISO_USERNAME/Desktop/*.desktop; do gio set -t string \$file metadata::xfce-exe-checksum "\$(sha256sum \$file | awk '{print \$1}')"; done | ||
#EOF | ||
#sudo tee /etc/cron.d/desktop_shortcuts <<EOF >/dev/null | ||
#@reboot weee export XDG_DATA_DIRS=\$XDG_DATA_DIRS:/home/$MISO_USERNAME/Desktop | ||
#EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
echo '=== Cleaning up Cron ===' | ||
sudo rm /etc/cron.hourly/* | ||
sudo rm /etc/cron.daily/* | ||
sudo rm /etc/cron.weekly/* | ||
sudo rm /etc/cron.monthly/* | ||
sudo rm /etc/cron.yearly/* | ||
|
||
echo '=== Setting cron.d executable ===' | ||
sudo chmod +x /etc/cron.d/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,133 +1,6 @@ | ||
#!/bin/bash | ||
# WEEEDebian creation script - a-porsia et al | ||
|
||
echo "=== SSH daemon configuration ===" | ||
cp ./sshd_config /etc/ssh/sshd_config | ||
|
||
echo "=== Modules configuration ===" | ||
_MODULES=("eeprom" "at24" "ee1004" "i2c-i801") | ||
for i in ${!_MODULES[@]}; do | ||
if [[ ! -f "/etc/modules-load.d/${_MODULES[$i]}.conf" ]]; then | ||
printf "${_MODULES[$i]}\n" >/etc/modules-load.d/${_MODULES[$i]}.conf | ||
fi | ||
done | ||
|
||
echo "=== DNS configuration ===" | ||
cp ./resolv.conf /etc/resolv.conf | ||
cp ./resolved.conf /etc/systemd/resolved.conf | ||
rm -f /var/run/NetworkManager/* 2>/dev/null | ||
|
||
echo "=== NTP configuration ===" | ||
systemctl enable systemd-timesyncd | ||
rm -f /etc/localtime | ||
ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime | ||
|
||
echo "=== Top configuration ===" | ||
cp ./toprc /root/.toprc | ||
sudo -u $MISO_USERNAME cp ./toprc /home/$MISO_USERNAME/.toprc | ||
|
||
echo "=== Prepare peracotta ===" | ||
apt-get install -y python3-pip pipx | ||
|
||
sudo -u $MISO_USERNAME pipx ensurepath | ||
sudo -u $MISO_USERNAME pipx install peracotta | ||
|
||
cp ./peracotta_update /etc/cron.d/peracotta_update | ||
|
||
#sudo -u $MISO_USERNAME sh -c 'cd /home/$MISO_USERNAME/peracotta && python3 polkit.py' | ||
sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/WEEE\ Open/peracotta # Ensure the dir exists | ||
sudo -u $MISO_USERNAME cp ./features.json /home/$MISO_USERNAME/.config/WEEE\ Open/peracotta/features.json | ||
|
||
echo "=== Add env to peracotta ===" | ||
if [[ -f "./env.txt" ]]; then | ||
sudo -u $MISO_USERNAME cp ./env.txt /home/$MISO_USERNAME/.config/WEEE\ Open/peracotta/.env | ||
else | ||
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" | ||
echo "@ @" | ||
echo "@ WARNING @" | ||
echo "@ @" | ||
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" | ||
echo "@ @" | ||
echo "@ env.txt not found in weeedebian/. @" | ||
echo "@ You're missing out many great peracotta features! @" | ||
echo "@ Check README for more info if you want to create the @" | ||
echo "@ file and automate your life! @" | ||
echo "@ @" | ||
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" | ||
fi | ||
|
||
echo "=== s.sh ===" | ||
cp ./s.sh /usr/sbin/s.sh | ||
chmod +x /usr/sbin/s.sh | ||
sudo -u $MISO_USERNAME cp ./ssh.desktop /home/$MISO_USERNAME/Desktop | ||
sudo -u $MISO_USERNAME chmod +x /home/$MISO_USERNAME/Desktop/ssh.desktop | ||
# su - $MISO_USERNAME -c "gio set -t string /home/$MISO_USERNAME/Desktop/ssh.desktop metadata::xfce-exe-checksum $(sha256sum /home/$MISO_USERNAME/Desktop/ssh.desktop | awk '{print $1}')" | ||
|
||
echo "=== XFCE configuration ===" | ||
sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/xfce4 | ||
rsync -a --force ./xfce4 /home/$MISO_USERNAME/.config | ||
chown weee: -R /home/$MISO_USERNAME/.config | ||
sudo -u $MISO_USERNAME cp ./light-locker.desktop /home/$MISO_USERNAME/.config/autostart/light-locker.desktop | ||
# sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/xfce4/desktop /home/$MISO_USERNAME/.config/xfce4/terminal | ||
|
||
echo "=== Desktop shortcuts ===" | ||
#if [[ -d "/home/$MISO_USERNAME/limone" ]]; then | ||
# sudo -u $MISO_USERNAME git -C /home/$MISO_USERNAME/limone pull --ff-only | ||
#else | ||
# sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/limone | ||
# sudo -u $MISO_USERNAME git clone https://github.com/WEEE-Open/limone.git /home/$MISO_USERNAME/limone | ||
#fi | ||
# | ||
#for desktop_file in $(sudo -u $MISO_USERNAME find /home/$MISO_USERNAME/limone -name "*.desktop" -type f -printf "%f "); do | ||
# sudo -u $MISO_USERNAME cp "/home/$MISO_USERNAME/limone/$desktop_file" "/home/$MISO_USERNAME/Desktop/$desktop_file" | ||
# sudo -u $MISO_USERNAME chmod +x "/home/$MISO_USERNAME/Desktop/$desktop_file" | ||
# sed -ri -e "s#Icon=(.*/)*([a-zA-Z0-9\-\.]+)#Icon=/home/$MISO_USERNAME/limone/\2#" "/home/$MISO_USERNAME/Desktop/$desktop_file" | ||
#done | ||
|
||
sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/WEEE\ Open/tarallo | ||
sudo -u $MISO_USERNAME cp ./Tarallo.desktop /home/$MISO_USERNAME/Desktop | ||
sudo -u $MISO_USERNAME cp ./tarallo.png /home/$MISO_USERNAME/.config/WEEE\ Open/tarallo/tarallo.png | ||
sudo -u $MISO_USERNAME chmod +x /home/$MISO_USERNAME/Desktop/Tarallo.desktop | ||
# su - $MISO_USERNAME -c "gio set -t string /home/$MISO_USERNAME/Desktop/Tarallo.desktop metadata::xfce-exe-checksum $(sha256sum /home/$MISO_USERNAME/Desktop/Tarallo.desktop | awk '{print $1}')" | ||
|
||
sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/WEEE\ Open/wiki | ||
sudo -u $MISO_USERNAME cp ./Wiki.desktop /home/$MISO_USERNAME/Desktop | ||
sudo -u $MISO_USERNAME cp ./limone.png /home/$MISO_USERNAME/.config/WEEE\ Open/wiki/wiki.png | ||
sudo -u $MISO_USERNAME chmod +x /home/$MISO_USERNAME/Desktop/Wiki.desktop | ||
# su - $MISO_USERNAME -c "gio set -t string /home/$MISO_USERNAME/Desktop/Wiki.desktop metadata::xfce-exe-checksum $(sha256sum /home/$MISO_USERNAME/Desktop/Wiki.desktop | awk '{print $1}')" | ||
|
||
#if [[ -f "/home/$MISO_USERNAME/Desktop/PeracottaGUI.desktop" ]]; then | ||
# rm -f "/home/$MISO_USERNAME/Desktop/PeracottaGUI.desktop" | ||
#fi | ||
sudo -u $MISO_USERNAME cp ./Peracotta.desktop /home/$MISO_USERNAME/Desktop | ||
sudo -u $MISO_USERNAME cp ./peracotta.png /home/$MISO_USERNAME/.config/WEEE\ Open/peracotta/peracotta.png | ||
sudo -u $MISO_USERNAME chmod +x /home/$MISO_USERNAME/Desktop/Peracotta.desktop | ||
# su - $MISO_USERNAME -c "gio set -t string /home/$MISO_USERNAME/Desktop/Peracotta.desktop metadata::xfce-exe-checksum $(sha256sum /home/$MISO_USERNAME/Desktop/Peracotta.desktop | awk '{print $1}')" | ||
|
||
sudo -u $MISO_USERNAME cp ./Peracruda.desktop /home/$MISO_USERNAME/Desktop | ||
sudo -u $MISO_USERNAME cp ./peracruda.png /home/$MISO_USERNAME/.config/WEEE\ Open/peracotta/peracruda.png | ||
sudo -u $MISO_USERNAME chmod +x /home/$MISO_USERNAME/Desktop/Peracruda.desktop | ||
# su - $MISO_USERNAME -c "gio set -t string /home/$MISO_USERNAME/Desktop/Peracruda.desktop metadata::xfce-exe-checksum "$(sha256sum /home/$MISO_USERNAME/Desktop/Peracruda.desktop | awk '{print $1}')" | ||
|
||
echo "=== Pointerkeys thing ===" | ||
sudo -u $MISO_USERNAME mkdir -p /home/$MISO_USERNAME/.config/autostart | ||
sudo -u $MISO_USERNAME cp ./Pointerkeys.desktop /home/$MISO_USERNAME/.config/autostart/Pointerkeys.desktop | ||
sudo -u $MISO_USERNAME cp ./pointerkeys.txt /home/$MISO_USERNAME/Desktop | ||
|
||
echo "=== Autologin stuff ===" | ||
cat <<EOF >/etc/lightdm/lightdm.conf | ||
[LightDM] | ||
[Seat:*] | ||
autologin-user=$MISO_USERNAME | ||
autologin-user-timeout=0 | ||
EOF | ||
mkdir -p /etc/systemd/system/[email protected] | ||
touch /etc/systemd/system/[email protected]/override.conf | ||
printf "[Service]\n" >/etc/systemd/system/[email protected]/override.conf | ||
printf "ExecStart=\n" >>/etc/systemd/system/[email protected]/override.conf | ||
printf "ExecStart=-/sbin/agetty --noissue --autologin weee %%I $TERM" >>/etc/systemd/system/[email protected]/override.conf | ||
|
||
echo "=== Final cleanup ===" | ||
# Remove unused packages | ||
apt-get autoremove -y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.