echo " ------------------------------- "
host="pve.giorgioravera.it"
user="root"
- command="cat $dst_tmp_cert > /etc/pve/local/pve-ssl.pem &&
- cat $dst_tmp_key > /etc/pve/local/pve-ssl.key &&
+ command="cat $dst_tmp_cert > /etc/pve/local/pveproxy-ssl.pem &&
+ cat $dst_tmp_key > /etc/pve/local/pveproxy-ssl.key &&
systemctl restart pveproxy.service &&
systemctl restart nginx.service"
update_certificate
echo ""
}
-update_server
-update_docker
-update_asterisk
-update_nas
-update_firewall
-update_xenserver
-#update_pve
\ No newline at end of file
+# Update all nodes
+function update_all ()
+{
+ update_server
+ update_docker
+ update_asterisk
+ update_nas
+ update_firewall
+ #update_xenserver
+ #update_pve
+}
+
+# Parse Options
+function parse_options ()
+{
+ if [ $# -eq 0 ]; then
+ update_all
+ exit
+ fi
+
+ # Parse Options
+ while [ $# -gt 0 ]; do
+ case $1 in
+ server )
+ update_server
+ shift
+ ;;
+ docker )
+ update_docker
+ shift
+ ;;
+ asterisk )
+ update_asterisk
+ shift
+ ;;
+ nas )
+ update_nas
+ shift
+ ;;
+ firewall )
+ update_firewall
+ shift
+ ;;
+ xenserver )
+ update_xenserver
+ shift
+ ;;
+ pve )
+ update_pve
+ shift
+ ;;
+ * ) shift
+ echo "Wrong node name selected"
+ ;;
+ esac
+ done
+}
+
+parse_options $@