Skip to content

Commit 84a7615

Browse files
committed
Changes:
1. copy docker.env to .env for docker-compose compatibility. 2. Do not use systemctl and run things when we are building docker image. 3. remove apply config when we are building image.
1 parent bb8dc64 commit 84a7615

File tree

3 files changed

+38
-31
lines changed

3 files changed

+38
-31
lines changed

common/docker-installer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ sed -i "s/hiddify-manager:latest/hiddify-manager:$TAG/g" docker-compose.yml
2929
echo "REDIS_PASSWORD=$redispassword"> docker.env
3030
echo "MYSQL_PASSWORD=$mysqlpassword">> docker.env
3131

32+
cp docker.env .env
33+
3234
# Start the containers using Docker Compose
3335
docker compose up -d --pull
3436

common/hiddify_installer.sh

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -245,31 +245,34 @@ function post_update_tasks() {
245245
echo "---------------------Finished!------------------------"
246246
fi
247247
remove_lock $NAME
248-
if [[ $panel_update == 0 ]]; then
249-
systemctl kill -s SIGTERM hiddify-panel
250-
fi
251-
systemctl start hiddify-panel
252-
253-
254-
cd /opt/hiddify-manager/hiddify-panel
255-
if [ "$CREATE_EASYSETUP_LINK" == "true" ];then
256-
hiddify-panel-cli set-setting --key create_easysetup_link --val True
257-
fi
258-
259-
case "$package_mode" in
260-
release|beta)
261-
hiddify-panel-cli set-setting --key package_mode --val $package_mode
262-
;;
263-
dev|develop)
264-
hiddify-panel-cli set-setting --key package_mode --val develop
265-
;;
266-
*)
267-
hiddify-panel-cli set-setting --key auto_update --val False
268-
;;
269-
esac
270-
271-
if [[ $panel_update == 0 && $config_update != 0 ]]; then
272-
bash /opt/hiddify-manager/apply_configs.sh --no-gui --no-log
248+
249+
if [ "$package_mode" != "docker" ];then
250+
if [[ $panel_update == 0 ]]; then
251+
systemctl kill -s SIGTERM hiddify-panel
252+
fi
253+
254+
systemctl start hiddify-panel
255+
256+
cd /opt/hiddify-manager/hiddify-panel
257+
if [ "$CREATE_EASYSETUP_LINK" == "true" ];then
258+
hiddify-panel-cli set-setting --key create_easysetup_link --val True
259+
fi
260+
261+
case "$package_mode" in
262+
release|beta)
263+
hiddify-panel-cli set-setting --key package_mode --val $package_mode
264+
;;
265+
dev|develop)
266+
hiddify-panel-cli set-setting --key package_mode --val develop
267+
;;
268+
*)
269+
hiddify-panel-cli set-setting --key auto_update --val False
270+
;;
271+
esac
272+
273+
if [[ $panel_update == 0 && $config_update != 0 ]]; then
274+
bash /opt/hiddify-manager/apply_configs.sh --no-gui --no-log
275+
fi
273276
fi
274277
}
275278

install.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ function main() {
5353
fi
5454

5555
# source common/set_config_from_hpanel.sh
56-
update_progress "HiddifyPanel" "Reading Configs from Panel..." 5
57-
set_config_from_hpanel
58-
59-
update_progress "Applying Configs" "..." 8
60-
61-
bash common/replace_variables.sh
56+
if [ "$DO_NOT_RUN" != "true" ];then
57+
update_progress "HiddifyPanel" "Reading Configs from Panel..." 5
58+
set_config_from_hpanel
59+
60+
update_progress "Applying Configs" "..." 8
61+
62+
bash common/replace_variables.sh
63+
fi
6264

6365
if [ "$MODE" != "apply_users" ]; then
6466
bash ./other/deprecated/remove_deprecated.sh

0 commit comments

Comments
 (0)