#!/bin/bash ADDR=$1 CFG_FILE=/usr/local/etc/roboger_push.ini if ! command -v curl > /dev/null; then echo "curl command not found. can not continue" exit 3 fi if [ "x${ADDR}" == "x" ]; then echo "Usage: install-roboger-push " exit 1 fi echo "Configuring roboger-push with address ${ADDR}" echo "Creating ${CFG_FILE}" if [ -f ${CFG_FILE} ]; then echo "The configuration file already exist on this system" echo "The script will not overwrite it" echo echo "Remove the config file and run the script again" exit 2 fi sed "s/PUT_HERE_YOUR_ROBOGER_ADDRESS/${ADDR}/g" > /usr/local/etc/roboger_push.ini <