2012-07-10

systemd service script for areca http proxy console


YOUR_INSTALL_PATH=/usr/local/sbin/areca
mkdir -p $YOUR_INSTALL_PATH
cd $YOUR_INSTALL_PATH

unzip !@#$%download_from_the_areca_website%$#@!

/lib/systemd/system/areca.service <<EOF
[Unit]
Description=Areca RAID System Administrative Console
After=network.target

[Service]
Type=simple
ExecStart=$YOUR_INSTALL_PATH/archttp64
WorkingDirectory=$YOUR_INSTALL_PATH

[Install]
WantedBy=basic.target
EOF

systemctl start areca.service

2012-07-07

dnsever script

#!/bin/sh 
DATE=`date '+%y-%m-%d %H:%M:%S'` 
RESULT=`wget -q -O - --http-user=YOUR_ID --http-passwd=YOUR_AUTH_CODE \
  'http://dyna.dnsever.com/update.php?host[YOUR_DOMAIN_NAME]' \ 
  | xmllint --xpath '//host' - ` echo $DATE $RESULT