first commit
This commit is contained in:
28
update_domoticz
Executable file
28
update_domoticz
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
cd $1
|
||||
|
||||
tar xfz update.tgz
|
||||
rm update.tgz
|
||||
rm update.tgz.sha256sum
|
||||
|
||||
lowercase(){
|
||||
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||
}
|
||||
|
||||
OS=`lowercase \`uname -s\``
|
||||
MACH=`uname -m`
|
||||
|
||||
# Restart on OSX
|
||||
if [ ${OS} = "darwin" ]; then
|
||||
launchctl unload /System/Library/LaunchAgents/com.domoticz.server.plist
|
||||
echo "Please standby ..."
|
||||
sleep 2
|
||||
launchctl load /System/Library/LaunchAgents/com.domoticz.server.plist
|
||||
else
|
||||
sudo service domoticz.sh stop
|
||||
sudo systemctl stop domoticz.service
|
||||
echo "Please standby ..."
|
||||
sleep 2
|
||||
sudo service domoticz.sh start
|
||||
sudo systemctl start domoticz.service
|
||||
fi
|
||||
Reference in New Issue
Block a user