fenrir/install.sh

64 lines
2.1 KiB
Bash
Raw Permalink Normal View History

2016-10-22 16:53:24 -04:00
#!/bin/bash
#Basic install script for Fenrir.
read -p "This will install Fenrir. Press ctrl+C to cancel, or enter to continue." continue
2017-02-17 03:48:17 -05:00
# Fenrir main application
2016-10-22 16:53:24 -04:00
install -m755 -d /opt/fenrir
cp -af src/fenrir/* /opt/fenrir
2017-02-17 03:48:17 -05:00
install -m644 -D "autostart/systemd/fenrir.service" /usr/lib/systemd/system/fenrir.service
ln -fs /opt/fenrir/fenrir-daemon /usr/bin/fenrir-daemon
ln -fs /opt/fenrir/fenrir /usr/bin/fenrir
2017-02-17 03:48:17 -05:00
# tools
install -m755 -d /usr/share/fenrir/tools
cp -af tools/* /usr/share/fenrir/tools
2017-02-17 03:48:17 -05:00
# scripts
install -m755 -d /usr/share/fenrir/scripts
cp -af "config/scripts/wlan__-__key_y.sh" /usr/share/fenrir/scripts/
2017-02-17 03:48:17 -05:00
2017-02-17 03:54:33 -05:00
# keyboard
install -m644 -D "config/keyboard/desktop.conf" /etc/fenrir/keyboard/desktop.conf
install -m644 -D "config/keyboard/laptop.conf" /etc/fenrir/keyboard/laptop.conf
2017-02-17 03:48:17 -05:00
2017-02-17 03:54:33 -05:00
# punctuation
install -m755 -d /etc/fenrir/punctuation
cp -af config/punctuation/* /etc/fenrir/punctuation
2017-02-17 03:48:17 -05:00
# sound
2016-11-04 16:32:35 -04:00
install -d /usr/share/sounds/fenrir
cp -af config/sound/default /usr/share/sounds/fenrir/default
cp -af config/sound/default-wav /usr/share/sounds/fenrir/default-wav
cp -af config/sound/template /usr/share/sounds/fenrir/template
2017-02-17 03:48:17 -05:00
# config
2017-02-17 03:54:33 -05:00
if [ -f "/etc/fenrir/settings/settings.conf" ]; then
echo "Do you want to overwrite your current global settings? (y/n)"
2017-02-17 03:48:17 -05:00
read yn
2017-02-19 08:48:07 -05:00
if [ $yn = "Y" -o $yn = "y" ]; then
2017-02-17 03:54:33 -05:00
mv /etc/fenrir/settings/settings.conf /etc/fenrir/settings/settings.conf.bak
echo "Your old settings.conf has been backed up to settings.conf.bak."
2017-02-17 03:48:17 -05:00
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf
2017-02-17 03:54:33 -05:00
else
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf.current
2017-02-17 03:48:17 -05:00
fi
else
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf
fi
2017-02-17 03:48:17 -05:00
# end message
2016-10-22 16:53:24 -04:00
cat << EOF
Installation complete.
2017-02-19 09:11:53 -05:00
install path:/opt/fenrir
settings path:/etc/fenrir
To test Fenrir
2017-02-17 03:48:17 -05:00
sudo systemctl start fenrir
To have Fenrir start on system boot:
2016-10-22 16:53:24 -04:00
sudo systemctl enable fenrir
2017-02-19 09:11:53 -05:00
2016-10-22 16:53:24 -04:00
Pulseaudio users may want to run
2017-10-24 04:38:12 -04:00
/usr/share/fenrir/tools/configure_pulse.sh
once from their user account, then once from the root.
2016-10-22 16:53:24 -04:00
EOF