File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
scripts/handle_tmux_automatic_start Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ systemd_unit_file() {
5151 local systemd_tmux_server_start_cmd=" $( get_tmux_option " ${systemd_tmux_server_start_cmd_option} " " ${systemd_tmux_server_start_cmd_default} " ) "
5252 local tmux_start_script_path=" ${CURRENT_DIR} /linux_start_tmux.sh"
5353 local systemd_unit_file=$( template " ${tmux_start_script_path} " " ${options} " )
54- mkdir -p " $( dirname ${systemd_unit_file_path} ) "
5554 echo " $systemd_unit_file "
5655}
5756
@@ -60,8 +59,13 @@ write_unit_file() {
6059}
6160
6261write_unit_file_unless_exists () {
63- if ! [ -e " ${systemd_unit_file_path} " ]; then
64- write_unit_file
62+
63+ local systemd_unit_file_dir=$( dirname ${systemd_unit_file_path} )
64+ if ! [ -d $systemd_unit_file_dir ]; then
65+ mkdir -p $systemd_unit_file_dir
66+ write_unit_file
67+ elif ! [ -e " ${systemd_unit_file_path} " ]; then
68+ write_unit_file
6569 fi
6670}
6771
You can’t perform that action at this time.
0 commit comments