Skip to content

Commit

Permalink
Merge branch 'master' into releng
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Mevel committed Jun 25, 2020
2 parents 2b429bf + f1b7607 commit c076e34
Showing 1 changed file with 58 additions and 48 deletions.
106 changes: 58 additions & 48 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,58 +313,68 @@ sudo chown root /lib/systemd/system-shutdown/nabboot.py
sudo chmod +x /lib/systemd/system-shutdown/nabboot.py

# Fix Pynab logs not rotated #139
cat > '/tmp/pynab' <<- END
/var/log/nab*.log
{
daily
rotate 7
missingok
notifempty
copytruncate
delaycompress
compress
}
END
sudo mv /tmp/pynab /etc/logrotate.d/pynab
if [ ! -f "/etc/logrotate.d/pynab" ]; then
cat > '/tmp/pynab' <<- END
/var/log/nab*.log
{
daily
rotate 7
missingok
notifempty
copytruncate
delaycompress
compress
}
END
sudo mv /tmp/pynab /etc/logrotate.d/pynab
sudo touch /tmp/pynab.upgrade.reboot
fi


# Fix Advertise rabbit on local network #141
cat > '/tmp/pynab.service' <<- END
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!-- See avahi.service(5) for more information about this configuration file -->
<service-group>
<name replace-wildcards="yes">Nabaztag rabbit (%h)</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>vendor=violet</txt-record>
<txt-record>model=tag:tag:tag</txt-record>
</service>
</service-group>
END
sudo mv /tmp/pynab.service /etc/avahi/services/pynab.service



cat > '/tmp/nabblocky.service' <<- END
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!-- See avahi.service(5) for more information about this configuration file -->
<service-group>
<name replace-wildcards="yes">NabBlockly (%h)</name>
<service>
<type>_http._tcp</type>
<port>8080</port>
<txt-record>vendor=Paul Guyot</txt-record>
<txt-record>model=tag:tag:tag</txt-record>
</service>
</service-group>
END
sudo mv /tmp/nabblocky.service /etc/avahi/services/nabblocky.service
if [ ! -f "/etc/avahi/services/pynab.service" ]; then

cat > '/tmp/pynab.service' <<- END
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!-- See avahi.service(5) for more information about this configuration file -->
<service-group>
<name replace-wildcards="yes">Nabaztag rabbit (%h)</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>vendor=violet</txt-record>
<txt-record>model=tag:tag:tag</txt-record>
</service>
</service-group>
END
sudo mv /tmp/pynab.service /etc/avahi/services/pynab.service
sudo touch /tmp/pynab.upgrade.reboot

fi

if [ ! -f "/etc/avahi/services/nabblocky.service" ]; then

cat > '/tmp/nabblocky.service' <<- END
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<!-- See avahi.service(5) for more information about this configuration file -->
<service-group>
<name replace-wildcards="yes">NabBlockly (%h)</name>
<service>
<type>_http._tcp</type>
<port>8080</port>
<txt-record>vendor=Paul Guyot</txt-record>
<txt-record>model=tag:tag:tag</txt-record>
</service>
</service-group>
END
sudo mv /tmp/nabblocky.service /etc/avahi/services/nabblocky.service
sudo touch /tmp/pynab.upgrade.reboot

fi

if [ -e /tmp/pynab.upgrade.reboot ]; then
echo "Upgrade requires reboot, rebooting now - 14/14" > /tmp/pynab.upgrade
Expand Down

0 comments on commit c076e34

Please sign in to comment.