-
Notifications
You must be signed in to change notification settings - Fork 34
/
LamyInstall.sh
40 lines (35 loc) · 1.26 KB
/
LamyInstall.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
clear
cd ~
systemctl stop LamyEraser.service 2&> /dev/null
systemctl disable LamyEraser.service 2&> /dev/null
echo "Downloading RemarkableLamyEraser Executable to /usr/sbin..."
cd /usr/sbin
rm -f RemarkableLamyEraser
wget --no-check-certificate https://raw.githubusercontent.com/isaacwisdom/RemarkableLamyEraser/v1/RemarkableLamyEraser/RemarkableLamyEraser
echo "Adding execute privleges..."
chmod +x RemarkableLamyEraser
cd ~
read -p "Would you like RemarkableLamyEraser to start automatically on boot? [y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Downloading service file to /lib/systemd/system..."
cd /lib/systemd/system/
rm -f LamyEraser.service
wget --no-check-certificate https://raw.githubusercontent.com/isaacwisdom/RemarkableLamyEraser/v1/RemarkableLamyEraser/LamyEraser.service
read -p "Would you like to edit your configuration now? [y/n]" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
nano LamyEraser.service
fi
echo "Setting up RemarkableLamyEraser to start on boot..."
systemctl daemon-reload
systemctl enable LamyEraser.service
echo "Starting RemarkableLamyEraser. Enjoy!"
systemctl start LamyEraser.service
else
echo "You can start RemarkableLamyEraser at any time by running RemarkableLamyEraser"
echo "Enjoy!"
fi