certimate/cmd/install_callback
2025-12-03 09:54:45 +08:00

24 lines
651 B
Bash

#!/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