#!/bin/bash ### This script is called after the user installs the application. DELETE_CMD="${TRIM_APPDEST}/certimate superuser delete admin@certimate.fun" CREATE_CMD="${TRIM_APPDEST}/certimate superuser add ${cer_user} ${cer_pwd}" echo "正在创建新的管理员账户..." $DELETE_CMD if [ $? -eq 0 ]; then echo "新管理员创建成功" else echo "错误:创建新管理员失败" exit 1 # 如果创建失败,退出并返回错误码 fi $CREATE_CMD if [ $? -eq 0 ]; then echo "新管理员创建成功" else echo "错误:创建新管理员失败" exit 1 # 如果创建失败,退出并返回错误码 fi exit 0