-
Notifications
You must be signed in to change notification settings - Fork 0
/
vncCAT.sh
53 lines (40 loc) · 1010 Bytes
/
vncCAT.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
41
42
43
44
45
46
47
48
49
50
51
52
53
#disable systemd-logind и getty
# off service
systemctl disable getty@tty1
# off service
systemctl disable getty-static
#add text
echo 'NAutoVTs=0
ReserveVT=0' >> /etc/systemd/logind.conf
#add Nyan cat
apt-get install nyancat -y
#add only this text
echo "[Unit]
Description=nyancat on tty1
After=graphical.target
[Service]
Type=simple
ExecStartPre=/bin/sleep 5
ExecStart=/usr/bin/nyancat -snI
ExecStop=/bin/kill -HUP ${MAINPID}
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty1
Restart=always
RestartSec=2
[Install]
WantedBy=graphical.target" > /etc/systemd/system/nyancat-tty.service
#enable service
systemctl enable nyancat-tty.service
# additional
# create service from isden hubr
systemctl mask getty\@tty1
#replase
sed -i 's/ACTIVE/#ACTIVE/' /etc/default/console-setup
#add text
echo 'ACTIVE_CONSOLES="/dev/tty1"' >> /etc/default/console-setup
#add text
echo '-:ALL:tty1' >> /etc/security/access.conf
#add text
echo 'account required pam_access.so' >> /etc/pam.d/login
reboot